Change discordId type from integer to string across frontend, backend, and API schema for consistency and proper validation.
This commit is contained in:
@@ -136,7 +136,7 @@ export class DiscordAppealComponent implements OnInit {
|
||||
this.bannedUser = {
|
||||
isBanned: false,
|
||||
bannedUser: {
|
||||
userId: 212303885988134914,
|
||||
userId: '212303885988134914',
|
||||
reason: "This is a test punishment",
|
||||
name: "stijn",
|
||||
avatarUrl: "https://cdn.discordapp.com/avatars/212303885988134914/3a264be54ca7208d638a22143fc8fdb8.webp?size=160"
|
||||
@@ -145,7 +145,7 @@ export class DiscordAppealComponent implements OnInit {
|
||||
this.nextPage();
|
||||
return
|
||||
}
|
||||
this.appealService.getBannedUser(Number(this.discordId))
|
||||
this.appealService.getBannedUser(this.discordId)
|
||||
.subscribe(user => {
|
||||
this.bannedUser = user
|
||||
this.nextPage();
|
||||
@@ -178,7 +178,7 @@ export class DiscordAppealComponent implements OnInit {
|
||||
throw new Error('JWT subject is null, are you logged in?');
|
||||
}
|
||||
const appeal: DiscordAppeal = {
|
||||
discordId: Number(this.discordId),
|
||||
discordId: this.discordId,
|
||||
appeal: rawValue.appeal,
|
||||
email: rawValue.email,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user