Skip to content

Commit

Permalink
fix: wizardのtoymoneyへのリクエストミスを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosugamea committed Nov 24, 2020
1 parent 1e3c087 commit 7075818
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def getUserInput(variable_name, default=None):
class NuxtImageBoardSetup():
TOYMONEY_PASSWORD_HEAD = environ.get('TOYMONEY_PASSWORD_HEAD')
TOYMONEY_ENDPOINT = environ.get('TOYMONEY_ENDPOINT')
TOYMONEY_TOKEN = environ.get('TOYMONEY_TOKEN')
SALT_INVITE = environ.get('SALT_INVITE')
SALT_PASS = environ.get('SALT_PASS')
SALT_JWT = environ.get('SALT_JWT')
Expand Down Expand Up @@ -49,11 +50,15 @@ def createSubApiUser(self, display_id="nib_admin"):
json={
"name": display_id,
"password": f"{self.TOYMONEY_PASSWORD_HEAD}{display_id}"
},
headers={
"Authorization": f"Bearer {self.TOYMONEY_TOKEN}"
}
)
if toyApiResp.status_code != 200:
raise Exception("ToyMoneyへのリクエストに失敗しました")
return toyApiResp.json()["apiKey"]
resp = toyApiResp.json()
return resp["apiKey"]

def generateApiKey(self, accountID):
self.cursor.execute(
Expand Down

0 comments on commit 7075818

Please sign in to comment.