mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(server): setup api for selfhost deployment (#7569)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user