UNPKG

open-collaboration-server

Version:

Open Collaboration Server implementation, part of the Open Collaboration Tools project

28 lines (22 loc) 868 B
// ****************************************************************************** // Copyright 2024 TypeFox GmbH // This program and the accompanying materials are made available under the // terms of the MIT License, which is available in the project root. // ****************************************************************************** import { injectable } from 'inversify'; import { nanoid } from 'nanoid'; import { User } from './types.js'; import { UserInfo } from './auth-endpoints/auth-endpoint.js'; @injectable() export class UserManager { async registerUser(user: UserInfo): Promise<User> { const registeredUser: User = { ...user, id: nanoid(24) }; return registeredUser; } async getUser(_id: string): Promise<User | undefined> { return undefined; } }