add publisher id to backend

This commit is contained in:
einhornimmond 2021-09-17 13:36:13 +02:00
parent 6a9a362578
commit 8ecd7a634b
3 changed files with 11 additions and 5 deletions

View File

@ -59,6 +59,9 @@ export class UpdateUserInfosArgs {
@Field({ nullable: true })
language?: string
@Field({ nullable: true })
publisherId?: number
@Field({ nullable: true })
password?: string

View File

@ -17,6 +17,7 @@ export class User {
this.username = json.username
this.description = json.description
this.language = json.language
this.publisherId = json.publisher_id
}
@Field(() => String)
@ -60,11 +61,10 @@ export class User {
/* I suggest to have a group as type here
@Field(() => ID)
groupId: number
// what is puvlisherId?
@Field(() => ID)
publisherId: number
*/
*/
// what is publisherId?
@Field(() => Number)
publisherId: number
@Field(() => KlickTipp)
klickTipp: KlickTipp

View File

@ -78,6 +78,7 @@ export class UserResolver {
emailType: 2,
login_after_register: true,
language: language,
publisher_id: 0
}
const result = await apiPost(CONFIG.LOGIN_API_URL + 'createUser', payload)
if (!result.success) {
@ -131,6 +132,7 @@ export class UserResolver {
description,
username,
language,
publisherId,
password,
passwordNew,
}: UpdateUserInfosArgs,
@ -145,6 +147,7 @@ export class UserResolver {
'User.description': description || undefined,
'User.username': username || undefined,
'User.language': language || undefined,
'User.publisher_id' : publisherId || undefined,
'User.password': passwordNew || undefined,
'User.password_old': password || undefined,
},