MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / signIn

Function signIn

apps/host-selfhost/src/admin/admin-users.node.test.ts:30–39  ·  view source on GitHub ↗
(email: string, password: string)

Source from the content-addressed store, hash-verified

28const BASE = "http://localhost:4788";
29
30const signIn = async (email: string, password: string): Promise<string> => {
31 const response = await handler(
32 new Request(`${BASE}/api/auth/sign-in/email`, {
33 method: "POST",
34 headers: { "content-type": "application/json" },
35 body: JSON.stringify({ email, password }),
36 }),
37 );
38 return response.headers.get("set-auth-token") ?? "";
39};
40
41const adminUsers = (token?: string, path = "/api/admin/users") =>
42 handler(

Callers 1

Calls 2

getMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected