mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
feat: improved user creation
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { Db } from "mongodb";
|
||||
|
||||
import { Tenant } from "talk-server/models/tenant";
|
||||
import { createUser, CreateUserInput } from "talk-server/models/user";
|
||||
import { upsertUser, UpsertUserInput } from "talk-server/models/user";
|
||||
|
||||
export type CreateUser = CreateUserInput;
|
||||
export type UpsertUser = UpsertUserInput;
|
||||
|
||||
export async function create(db: Db, tenant: Tenant, input: CreateUser) {
|
||||
const user = await createUser(db, tenant.id, input);
|
||||
export async function upsert(db: Db, tenant: Tenant, input: UpsertUser) {
|
||||
const user = await upsertUser(db, tenant.id, input);
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user