mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
97c459be67
* feat: add find-workspace and email verification endpoints * sync
20 lines
717 B
TypeScript
20 lines
717 B
TypeScript
import { IWorkspace } from "@/features/workspace/types/workspace.types.ts";
|
|
import api from "@/lib/api-client.ts";
|
|
|
|
export async function getJoinedWorkspaces(): Promise<Partial<IWorkspace[]>> {
|
|
const req = await api.post<Partial<IWorkspace[]>>("/workspace/joined");
|
|
return req.data;
|
|
}
|
|
|
|
export async function findWorkspacesByEmail(email: string): Promise<void> {
|
|
await api.post("/workspace/find-by-email", { email });
|
|
}
|
|
|
|
export async function verifyEmail(data: { token: string }): Promise<void> {
|
|
await api.post("/workspace/verify-email", data);
|
|
}
|
|
|
|
export async function resendVerificationEmail(data: { email: string; sig: string }): Promise<void> {
|
|
await api.post("/workspace/resend-verification", data);
|
|
}
|