MCPcopy Index your code
hub / github.com/filebrowser/filebrowser / create

Function create

frontend/src/api/users.ts:11–27  ·  view source on GitHub ↗
(user: IUser, currentPassword: string)

Source from the content-addressed store, hash-verified

9}
10
11export async function create(user: IUser, currentPassword: string) {
12 const res = await fetchURL(`/api/users`, {
13 method: "POST",
14 body: JSON.stringify({
15 what: "user",
16 which: [],
17 current_password: currentPassword,
18 data: user,
19 }),
20 });
21
22 if (res.status === 201) {
23 return res.headers.get("Location");
24 }
25
26 throw new StatusError(await res.text(), res.status);
27}
28
29export async function update(
30 user: Partial<IUser>,

Callers

nothing calls this directly

Calls 1

fetchURLFunction · 0.90

Tested by

no test coverage detected