mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-30 07:14:33 +00:00
Add Logout call to signout (#221)
* Add Logout call to signout * clean local storage even on error --------- Co-authored-by: eglehelms <e.helms@cognigy.com>
This commit is contained in:
1 parent
7f93489580
commit
f4d7880ab7
3 files changed
+30
-6
No files matched your search
@@ -189,6 +189,7 @@ export const CRED_NOT_TESTED = "not tested";
|
||||
|
||||
/** API base paths */
|
||||
export const API_LOGIN = `${API_BASE_URL}/login`;
|
||||
export const API_LOGOUT = `${API_BASE_URL}/logout`;
|
||||
export const API_SBCS = `${API_BASE_URL}/Sbcs`;
|
||||
export const API_USERS = `${API_BASE_URL}/Users`;
|
||||
export const API_API_KEYS = `${API_BASE_URL}/ApiKeys`;
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
API_SIP_GATEWAY,
|
||||
API_PASSWORD_SETTINGS,
|
||||
USER_ACCOUNT,
|
||||
API_LOGOUT,
|
||||
} from "./constants";
|
||||
import { ROUTE_LOGIN } from "src/router/routes";
|
||||
import {
|
||||
@@ -233,6 +234,10 @@ export const postLogin = (payload: UserLoginPayload) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const postLogout = () => {
|
||||
return postFetch<undefined>(API_LOGOUT);
|
||||
};
|
||||
|
||||
/** Named wrappers for `postFetch` */
|
||||
|
||||
export const postServiceProviders = (payload: Partial<ServiceProvider>) => {
|
||||
|
||||
Reference in new issue
Block a user