aswi2023one-team-to-rule-them-all-gitlab/src/api/authservice.ts @ d963a25c
1 |
import { axiosInstance } from "./api" |
---|---|
2 |
import {Toast} from "native-base" |
3 |
|
4 |
export const loginRequest = async (username: string, password: string) => { |
5 |
return await axiosInstance.post( |
6 |
"/login", |
7 |
{
|
8 |
username: username, |
9 |
password: password |
10 |
}
|
11 |
)
|
12 |
}
|
13 |
|
14 |
export const isAuthRequest = async () => { |
15 |
return await axiosInstance.get( |
16 |
"/isauth" |
17 |
)
|
18 |
}
|
19 |
|
20 |
export const logoutRequest = async () => { |
21 |
return await axiosInstance.get( |
22 |
"/logout" |
23 |
)
|
24 |
}
|
25 |
|
26 |
|