mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change from datamapper to active pattern (we mix it now)
This commit is contained in:
parent
e6c3974748
commit
92179fc558
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
import { Resolver, Query, Args, Arg, Authorized, Ctx, UseMiddleware, Mutation } from 'type-graphql'
|
import { Resolver, Query, Args, Arg, Authorized, Ctx, UseMiddleware, Mutation } from 'type-graphql'
|
||||||
import { from_hex as fromHex } from 'libsodium-wrappers'
|
import { from_hex as fromHex } from 'libsodium-wrappers'
|
||||||
import { getRepository } from 'typeorm'
|
|
||||||
import CONFIG from '../../config'
|
import CONFIG from '../../config'
|
||||||
import { CheckUsernameResponse } from '../models/CheckUsernameResponse'
|
import { CheckUsernameResponse } from '../models/CheckUsernameResponse'
|
||||||
import { LoginViaVerificationCode } from '../models/LoginViaVerificationCode'
|
import { LoginViaVerificationCode } from '../models/LoginViaVerificationCode'
|
||||||
@ -95,8 +94,7 @@ export class UserResolver {
|
|||||||
user.lastName = qluser.lastName
|
user.lastName = qluser.lastName
|
||||||
user.username = qluser.username
|
user.username = qluser.username
|
||||||
|
|
||||||
const repository = getRepository(DbUser)
|
user.save().catch(() => {
|
||||||
repository.save(user).catch(() => {
|
|
||||||
throw new Error('error saving user')
|
throw new Error('error saving user')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
1133
backend/yarn.lock
1133
backend/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user