Merge branch 'develop' into v2
This commit is contained in:
commit
a39802cb4e
19 changed files with 241 additions and 99 deletions
15
resources/scripts/api/account/getTwoFactorTokenData.ts
Normal file
15
resources/scripts/api/account/getTwoFactorTokenData.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import http from '@/api/http';
|
||||
|
||||
export interface TwoFactorTokenData {
|
||||
// eslint-disable-next-line camelcase
|
||||
image_url_data: string;
|
||||
secret: string;
|
||||
}
|
||||
|
||||
export default (): Promise<TwoFactorTokenData> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get('/api/client/account/two-factor')
|
||||
.then(({ data }) => resolve(data.data))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
import http from '@/api/http';
|
||||
|
||||
export default (): Promise<string> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get('/api/client/account/two-factor')
|
||||
.then(({ data }) => resolve(data.data.image_url_data))
|
||||
.catch(reject);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue