import { Client, ID, Users } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param id ID of the user to be created. Leave blank to generate a unique ID.
*/
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
id?: string,
email?: string,
phone?: string,
password?: string,
name?: string,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key);
const users = new Users(client);
return await users.create(
id || ID.unique(),
email || undefined,
phone || undefined,
password || undefined,
name || undefined,
);
}
Submitted by admin 497 days ago
import { Client, ID, Users } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param id ID of the user to be created. Leave blank to generate a unique ID.
*/
type Appwrite = {
endpoint: string;
project: string;
key: string;
self_signed: boolean;
};
export async function main(
auth: Appwrite,
id?: string,
email?: string,
phone?: string,
password?: string,
name?: string,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const users = new Users(client);
return await users.create(
id || ID.unique(),
email || undefined,
phone || undefined,
password || undefined,
name || undefined
);
}
Submitted by admin 500 days ago
import { Resource } from "https://deno.land/x/windmill@v1.87.0/mod.ts"
import { Client, ID, Users } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param id ID of the user to be created. Leave blank to generate a unique ID.
*/
export async function main(
auth: Resource<'appwrite'>,
id?: string,
email?: string,
phone?: string,
password?: string,
name?: string,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const users = new Users(client);
return await users.create(
id || ID.unique(),
email || undefined,
phone || undefined,
password || undefined,
name || undefined
);
}
Submitted by adam186 615 days ago
import { Resource } from "https://deno.land/x/windmill@v1.87.0/mod.ts"
import { Client, ID, Users, } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
/**
* @param id ID of the user to be created. Leave blank to generate a unique ID.
*/
export async function main(
auth: Resource<'appwrite'>,
id?: string,
email?: string,
phone?: string,
password?: string,
name?: string,
) {
const client = new Client()
.setEndpoint(auth.endpoint)
.setProject(auth.project)
.setKey(auth.key)
const users = new Users(client);
return await users.create(
id || ID.unique(),
email || undefined,
phone || undefined,
password || undefined,
name || undefined
);
}
Submitted by adam186 615 days ago