mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-13 08:46:20 +02:00
Add auth provider
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
import { Post } from '../rest/RestMethods.js';
|
||||
import { BackendApiUrl } from '@/properties/Сonfig.js';
|
||||
|
||||
export function
|
||||
LogIn(authCode) {
|
||||
return Post(BackendApiUrl + "/LogIn", { code: authCode }).then((data) => {
|
||||
console.log(data);
|
||||
return data;
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
// export function
|
||||
// LogIn(authCode) {
|
||||
// return Post(BackendApiUrl + "/LogIn", { code: authCode }).then((data) => {
|
||||
// console.log(data);
|
||||
// return data;
|
||||
// }).catch(error => {
|
||||
// console.log(error)
|
||||
// });
|
||||
// }
|
||||
export async function LogIn(authCode) {
|
||||
try {
|
||||
const response = await Post(BackendApiUrl + "/Authorize/LogIn", { code: authCode });
|
||||
console.log(response);
|
||||
return response;
|
||||
} catch (error) {
|
||||
console.error('Ошибка в LogIn:', error);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user