@@ -15,6 +15,7 @@ import { ServerService } from '../config';
|
|||||||
import { validators } from '../utils/validators';
|
import { validators } from '../utils/validators';
|
||||||
|
|
||||||
interface CreateUserInput {
|
interface CreateUserInput {
|
||||||
|
name?: string;
|
||||||
email: string;
|
email: string;
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
@@ -58,6 +59,7 @@ export class CustomSetupController {
|
|||||||
throw new InternalServerError();
|
throw new InternalServerError();
|
||||||
}
|
}
|
||||||
const user = await this.models.user.create({
|
const user = await this.models.user.create({
|
||||||
|
name: input.name || undefined,
|
||||||
email: input.email,
|
email: input.email,
|
||||||
password: input.password,
|
password: input.password,
|
||||||
registered: true,
|
registered: true,
|
||||||
|
|||||||
1
packages/common/y-octo/yjs
Submodule
1
packages/common/y-octo/yjs
Submodule
Submodule packages/common/y-octo/yjs added at 7126035d1b
@@ -99,6 +99,7 @@ export const Form = () => {
|
|||||||
const createResponse = await affineFetch('/api/setup/create-admin-user', {
|
const createResponse = await affineFetch('/api/setup/create-admin-user', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
name: nameValue,
|
||||||
email: emailValue,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user