mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-15 21:03:45 +02:00
Merge branch 'develop' into v2
This commit is contained in:
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);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user