mirror of
https://github.com/docmost/docmost.git
synced 2025-11-20 22:01:11 +10:00
refactor: switch to HttpOnly cookie (#660)
* Switch to httpOnly cookie * create endpoint to retrieve temporary collaboration token * cleanups
This commit is contained in:
@ -7,7 +7,6 @@ import {
|
||||
IAcceptInvite,
|
||||
} from "../types/workspace.types";
|
||||
import { IPagination, QueryParams } from "@/lib/types.ts";
|
||||
import { ITokenResponse } from "@/features/auth/types/auth.types.ts";
|
||||
|
||||
export async function getWorkspace(): Promise<IWorkspace> {
|
||||
const req = await api.post<IWorkspace>("/workspace/info");
|
||||
@ -51,11 +50,8 @@ export async function createInvitation(data: ICreateInvite) {
|
||||
return req.data;
|
||||
}
|
||||
|
||||
export async function acceptInvitation(
|
||||
data: IAcceptInvite,
|
||||
): Promise<ITokenResponse> {
|
||||
const req = await api.post("/workspace/invites/accept", data);
|
||||
return req.data;
|
||||
export async function acceptInvitation(data: IAcceptInvite): Promise<void> {
|
||||
await api.post<void>("/workspace/invites/accept", data);
|
||||
}
|
||||
|
||||
export async function resendInvitation(data: {
|
||||
|
||||
Reference in New Issue
Block a user