fix attempt 2
This commit is contained in:
parent
575fa3fcb1
commit
bf6c1095de
@ -218,7 +218,7 @@ router.patch(
|
|||||||
await Guild.insertChannelInOrder(guild.id, channel.id, 0, guild);
|
await Guild.insertChannelInOrder(guild.id, channel.id, 0, guild);
|
||||||
|
|
||||||
guild.rules_channel_id = channel.id;
|
guild.rules_channel_id = channel.id;
|
||||||
} else if (body.rules_channel_id != undefined) {
|
} else if (body.rules_channel_id) {
|
||||||
// ensure channel exists in this guild
|
// ensure channel exists in this guild
|
||||||
await Channel.findOneOrFail({
|
await Channel.findOneOrFail({
|
||||||
where: { guild_id, id: body.rules_channel_id },
|
where: { guild_id, id: body.rules_channel_id },
|
||||||
|
@ -236,7 +236,7 @@ export class Guild extends BaseClass {
|
|||||||
public_updates_channel_id: string;
|
public_updates_channel_id: string;
|
||||||
|
|
||||||
@JoinColumn({ name: "public_updates_channel_id" })
|
@JoinColumn({ name: "public_updates_channel_id" })
|
||||||
@ManyToOne(() => Channel)
|
@ManyToOne(() => Channel, { nullable: true })
|
||||||
public_updates_channel?: Channel;
|
public_updates_channel?: Channel;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
@ -244,7 +244,7 @@ export class Guild extends BaseClass {
|
|||||||
rules_channel_id?: string;
|
rules_channel_id?: string;
|
||||||
|
|
||||||
@JoinColumn({ name: "rules_channel_id" })
|
@JoinColumn({ name: "rules_channel_id" })
|
||||||
@ManyToOne(() => Channel)
|
@ManyToOne(() => Channel, { nullable: true })
|
||||||
rules_channel?: string;
|
rules_channel?: string;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user