mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-18 10:41:04 +10:00
cleanups
This commit is contained in:
@ -33,11 +33,12 @@ export class AuthController {
|
||||
return this.authService.login(loginInput, req.raw.workspaceId);
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
/* @HttpCode(HttpStatus.OK)
|
||||
@Post('register')
|
||||
async register(@Req() req, @Body() createUserDto: CreateUserDto) {
|
||||
return this.authService.register(createUserDto, req.raw.workspaceId);
|
||||
}
|
||||
*/
|
||||
|
||||
@UseGuards(SetupGuard)
|
||||
@HttpCode(HttpStatus.OK)
|
||||
|
||||
@ -78,7 +78,11 @@ export class SignupService {
|
||||
// create user
|
||||
|
||||
const user = await this.userRepo.insertUser(
|
||||
{ ...createAdminUserDto, role: UserRole.OWNER },
|
||||
{
|
||||
...createAdminUserDto,
|
||||
role: UserRole.OWNER,
|
||||
emailVerifiedAt: new Date(),
|
||||
},
|
||||
trx,
|
||||
);
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import { GroupUserRepo } from '@docmost/db/repos/group/group-user.repo';
|
||||
import InvitationAcceptedEmail from '@docmost/transactional/emails/invitation-accepted-email';
|
||||
import { EnvironmentService } from '../../../integrations/environment/environment.service';
|
||||
import { TokenService } from '../../auth/services/token.service';
|
||||
import { nanoIdGen } from '../../../common/helpers/nanoid.utils';
|
||||
import { nanoIdGen } from '../../../common/helpers';
|
||||
import { PaginationOptions } from '@docmost/db/pagination/pagination-options';
|
||||
import { executeWithPagination } from '@docmost/db/pagination/pagination';
|
||||
import { TokensDto } from '../../auth/dto/tokens.dto';
|
||||
@ -179,6 +179,7 @@ export class WorkspaceInvitationService {
|
||||
role: invitation.role,
|
||||
lastLoginAt: new Date(),
|
||||
invitedById: invitation.invitedById,
|
||||
emailVerifiedAt: new Date(),
|
||||
})
|
||||
.returningAll()
|
||||
.executeTakeFirst();
|
||||
|
||||
Reference in New Issue
Block a user