feat(projects): add request refresh token & logout

This commit is contained in:
Soybean
2024-03-24 05:11:30 +08:00
parent 1ed33dc47a
commit 11a6a3bd80
5 changed files with 93 additions and 24 deletions

View File

@@ -37,13 +37,12 @@ export function fetchRefreshToken(refreshToken: string) {
});
}
export function fetchDebug() {
return request<string>({
url: '/debug-post',
method: 'post',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
data: {
a: '1'
}
});
/**
* return custom backend error
*
* @param code error code
* @param msg error message
*/
export function fetchCustomBackendError(code: string, msg: string) {
return request({ url: '/auth/error', params: { code, msg } });
}