Compare commits
2 Commits
ea696d0f0e
...
fe86382819
Author | SHA1 | Date |
---|---|---|
Inex Code | fe86382819 | |
Inex Code | d7fe7097e6 |
|
@ -1,7 +1,8 @@
|
|||
from selfprivacy_api.utils import ReadUserData
|
||||
from selfprivacy_api.migrations.fix_nixos_config_branch import FixNixosConfigBranch
|
||||
from selfprivacy_api.migrations.create_tokens_json import CreateTokensJson
|
||||
|
||||
migrations = [FixNixosConfigBranch()]
|
||||
migrations = [FixNixosConfigBranch(), CreateTokensJson()]
|
||||
|
||||
|
||||
def run_migrations():
|
||||
|
|
|
@ -35,7 +35,8 @@ class CreateTokensJson(Migration):
|
|||
|
||||
def migrate(self):
|
||||
try:
|
||||
with ReadUserData(USERDATA_FILE) as userdata:
|
||||
print(f"Creating tokens.json file at {TOKENS_FILE}")
|
||||
with ReadUserData() as userdata:
|
||||
token = userdata["api"]["token"]
|
||||
# Touch tokens.json with 0600 permissions
|
||||
Path(TOKENS_FILE).touch(mode=0o600)
|
||||
|
|
|
@ -43,8 +43,6 @@ class AuthorizeDevice(Resource):
|
|||
---
|
||||
tags:
|
||||
- Tokens
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- in: body
|
||||
name: data
|
||||
|
|
|
@ -140,8 +140,6 @@ class UseRecoveryToken(Resource):
|
|||
---
|
||||
tags:
|
||||
- Tokens
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- in: body
|
||||
name: data
|
||||
|
|
Loading…
Reference in New Issue