2021-06-19 08:20:43 +00:00
|
|
|
import { LogoutPath } from "@services/Api";
|
|
|
|
import { PostWithOptionalResponse } from "@services/Client";
|
2019-11-18 23:37:36 +00:00
|
|
|
|
2021-04-13 08:38:12 +00:00
|
|
|
export type SignOutResponse = { safeTargetURL: boolean } | undefined;
|
|
|
|
|
|
|
|
export type SignOutBody = {
|
|
|
|
targetURL?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export async function signOut(targetURL: string | undefined): Promise<SignOutResponse> {
|
|
|
|
const body: SignOutBody = {};
|
|
|
|
if (targetURL) {
|
|
|
|
body.targetURL = targetURL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return PostWithOptionalResponse<SignOutResponse>(LogoutPath, body);
|
2021-01-02 10:58:24 +00:00
|
|
|
}
|