You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
653 B
23 lines
653 B
import type { IdentitySessionDto } from "#/management/identity/sessions";
|
|
import type { PagedResultDto } from "#/abp-core";
|
|
import requestClient from "@/api/request";
|
|
|
|
export interface GetMySessionsInput {
|
|
filter?: string;
|
|
maxResultCount?: number;
|
|
skipCount?: number;
|
|
}
|
|
|
|
/**
|
|
* Get current user's sessions
|
|
*/
|
|
export const getSessionsApi = (input?: GetMySessionsInput) =>
|
|
requestClient.get<PagedResultDto<IdentitySessionDto>>("/api/account/my-profile/sessions", {
|
|
params: input,
|
|
});
|
|
|
|
/**
|
|
* Revoke a session
|
|
*/
|
|
export const revokeSessionApi = (sessionId: string) =>
|
|
requestClient.delete(`/api/account/my-profile/sessions/${sessionId}/revoke`);
|
|
|