Add filetype to the config.
This commit is contained in:
parent
4195159003
commit
cc10c145b5
2 changed files with 2 additions and 1 deletions
1
server/src/types/config.d.ts
vendored
1
server/src/types/config.d.ts
vendored
|
|
@ -8,6 +8,7 @@ interface config {
|
|||
};
|
||||
datastores: {
|
||||
enabled: boolean;
|
||||
filetype: string;
|
||||
directory: string;
|
||||
};
|
||||
game: {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export function processExit() {
|
|||
if (activeGame(game)) {
|
||||
game.log.debug(`Saving to datastore`);
|
||||
writeFileSync(
|
||||
`${conf.datastores.directory}/${game.id}.game`,
|
||||
`${conf.datastores.directory}/${game.id}.${conf.datastores.filetype}`,
|
||||
JSON.stringify(game.toJSON())
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue