Auto-create channels when we attempt to get them because Docker doesn't seem to be saving the DB file in production
This commit is contained in:
parent
fe91f856fe
commit
667b3f04aa
1 changed files with 3 additions and 0 deletions
|
|
@ -38,6 +38,9 @@ export class JSONDatabase {
|
||||||
};
|
};
|
||||||
|
|
||||||
public async getChannel(name: string) {
|
public async getChannel(name: string) {
|
||||||
|
if (this.data[name] == null) {
|
||||||
|
this.resetChannel(name);
|
||||||
|
};
|
||||||
return this.data[name];
|
return this.data[name];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue