Fix linting

This commit is contained in:
Gabriel Tofvesson 2022-10-22 14:11:12 +02:00
parent 038457f02d
commit 7b0ddf25d5
3 changed files with 22 additions and 20 deletions

View File

@ -31,7 +31,7 @@ app.post("/create", async (req: Request, res: Response) => {
const id = await createVote(prompt, description, options);
await setState(id);
console.log("set state")
console.log("set state");
res.json({id});
});

View File

@ -17,11 +17,13 @@ export const setState = (currentVote: string | null) =>
stateCollection.doc("currentVote").set({
currentVote,
changes: 0,
voteChanges: 0
voteChanges: 0,
});
export const updateState = () =>
stateCollection.doc("currentVote").update({changes: FieldValue.increment(1)});
export const updateVoteCount = () =>
stateCollection.doc("currentVote").update({voteChanges: FieldValue.increment(1)});
stateCollection.doc("currentVote").update({
voteChanges: FieldValue.increment(1),
});