o
    g                     @   s   d dl mZmZmZ d dlZd dlmZ eeZddgZ	e
de	ZeeZeddZejd	d
gddd ZedkrCeZdS dS )    )FlaskrequestjsonifyN)ServiceAccountCredentialsz%https://spreadsheets.google.com/feedsz%https://www.googleapis.com/auth/drivez../service_account.json,1y24t8xAbfwodjAu3codA3MgtGWEhUyeI9H2uyWeiNiQu   アカウントz/salon/register_accountPOST)methodsc               
   C   s   z?t jd} t jd}t jd}t jd}t jd}t jd}t jdd}t| ||||||g td	d
dW S  tyZ } ztdt|dW  Y d }~S d }~ww )NuuidnamephoneaccountpasswordnotifyMethodemail successu   登録完了)statusmessageerror)r   formgetsheet
append_rowr   	Exceptionstr)r	   r
   r   r   r   notify_methodr   e r   )/var/www/html/salon/python/flaskServer.pyregisterAccount   s   r   __main__)flaskr   r   r   gspreadoauth2client.service_accountr   __name__appscopefrom_json_keyfile_namecreds	authorizeclientopen_by_key	worksheetr   router   gunicorn_appr   r   r   r   <module>   s    

