mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
13 lines
345 B
TypeScript
13 lines
345 B
TypeScript
import { Db } from "mongodb";
|
|
|
|
import { Tenant } from "talk-server/models/tenant";
|
|
import { upsertUser, UpsertUserInput } from "talk-server/models/user";
|
|
|
|
export type UpsertUser = UpsertUserInput;
|
|
|
|
export async function upsert(db: Db, tenant: Tenant, input: UpsertUser) {
|
|
const user = await upsertUser(db, tenant.id, input);
|
|
|
|
return user;
|
|
}
|