This commit is contained in:
Neeraj Gupta 2023-04-03 11:02:55 +05:30
parent 5e7411c405
commit 8c8a03db3d
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,5 @@
import HTTPService from 'services/HTTPService';
import { AuthEntity } from 'types/authenticator/auth_entity';
import { AuthEntity } from 'types/authenticator/api';
import { Code } from 'types/authenticator/code';
import ComlinkCryptoWorker from 'utils/comlink/ComlinkCryptoWorker';
import { getEndpoint } from 'utils/common/apiUtil';
@ -61,7 +61,7 @@ export const getAuthCodes = async (): Promise<Code[]> => {
}
};
export const getAuthKey = async () => {
export const getAuthKey = async (): Promise<AuthEntity> => {
try {
const resp = await HTTPService.get(
`${ENDPOINT}/authenticator/key`,

View file

@ -6,3 +6,8 @@ export interface AuthEntity {
createdAt: number;
updatedAt: number;
}
export interface AuthKey {
encryptedKey: string;
header: string;
}