Squashing config rework.

This commit is contained in:
Roland 2022-02-16 21:57:27 -07:00
parent 5425142adb
commit 08065155cf
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
38 changed files with 1046 additions and 633 deletions

View file

@ -19,8 +19,8 @@ bp = get_blueprint('OTP', '/api/otp')
body=schema.EncryptOTPRequest,
)
@validate(schema.EncryptOTPRequest)
async def post_encrypt_otp(_: Request, data: dict):
data = lib.encrypt_otp(data['otp'], data['plaintext'])
async def post_encrypt_otp(_: Request, body: schema.EncryptOTPRequest):
data = lib.encrypt_otp(body.otp, body.plaintext)
return response.json(data)
@ -30,8 +30,8 @@ async def post_encrypt_otp(_: Request, data: dict):
body=schema.DecryptOTPRequest,
)
@validate(schema.DecryptOTPRequest)
async def post_decrypt_otp(_: Request, data: dict):
data = lib.decrypt_otp(data['otp'], data['ciphertext'])
async def post_decrypt_otp(_: Request, body: schema.DecryptOTPRequest):
data = lib.decrypt_otp(body.otp, body.ciphertext)
return response.json(data)