refactor
This commit is contained in:
parent
5e7411c405
commit
8c8a03db3d
|
@ -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`,
|
||||
|
|
|
@ -6,3 +6,8 @@ export interface AuthEntity {
|
|||
createdAt: number;
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface AuthKey {
|
||||
encryptedKey: string;
|
||||
header: string;
|
||||
}
|
Loading…
Reference in a new issue