Fixing OTP api urls.

This commit is contained in:
Roland 2021-12-30 19:10:12 -07:00
parent d3b985241b
commit 120ce7cd2c
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 4 additions and 4 deletions

View file

@ -228,7 +228,7 @@ export async function refreshChannel(link) {
export async function encryptOTP(otp, plaintext) {
let body = {otp, plaintext};
let response = await apiPost(`${OTP_API}:encrypt_otp`, body);
let response = await apiPost(`${OTP_API}/encrypt_otp`, body);
if (response.status !== 200) {
toast({
type: 'error',
@ -243,7 +243,7 @@ export async function encryptOTP(otp, plaintext) {
export async function decryptOTP(otp, ciphertext) {
let body = {otp, ciphertext};
let response = await apiPost(`${OTP_API}:decrypt_otp`, body);
let response = await apiPost(`${OTP_API}/decrypt_otp`, body);
if (response.status !== 200) {
toast({
type: 'error',

View file

@ -13,7 +13,7 @@ from .schema import EncryptOTPRequest, DecryptOTPRequest
bp = get_blueprint('OTP', '/api/otp')
@bp.post(':encrypt_otp')
@bp.post('/encrypt_otp')
@validate_doc(
summary='Encrypt a message with OTP',
consumes=EncryptOTPRequest,
@ -23,7 +23,7 @@ async def post_encrypt_otp(_: Request, data: dict):
return response.json(data)
@bp.post(':decrypt_otp')
@bp.post('/decrypt_otp')
@validate_doc(
summary='Decrypt a message with OTP',
consumes=DecryptOTPRequest,