feat(server): setup api for selfhost deployment (#7569)

This commit is contained in:
forehalo
2024-07-23 10:39:33 +00:00
parent 14fbeb7879
commit dddbfe6473
21 changed files with 243 additions and 136 deletions

View File

@@ -1,5 +1,4 @@
import type { INestApplication } from '@nestjs/common';
import { hashSync } from '@node-rs/argon2';
import request, { type Response } from 'supertest';
import {
@@ -54,7 +53,7 @@ export async function signUp(
const user = await app.get(UserService).createUser({
name,
email,
password: hashSync(password),
password,
emailVerifiedAt: autoVerifyEmail ? new Date() : null,
});
const { sessionId } = await app.get(AuthService).createUserSession(user);