From d402cd8cebbf6efb3acd58a6e6fbdc5c8e4e02b5 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 3 May 2024 20:59:32 +0200 Subject: [PATCH] Fix prettier workflow (#145) Co-authored-by: Sainan --- .github/workflows/prettier.yml | 8 ++++---- src/controllers/api/genericUpdateController.ts | 2 +- static/fixed_responses/aggregateSessions.json | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 85fcd1fa0..a2458fd81 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,10 +1,10 @@ name: Prettier -on: - pull_request: - branches: [main] +on: [push] jobs: format: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4.1.2 @@ -13,7 +13,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4.0.2 with: - node-version: "18.x" + node-version: "20.x" - run: npm ci - run: npm run prettier - name: Commit changes diff --git a/src/controllers/api/genericUpdateController.ts b/src/controllers/api/genericUpdateController.ts index ab8b8446d..4e96ac6ef 100644 --- a/src/controllers/api/genericUpdateController.ts +++ b/src/controllers/api/genericUpdateController.ts @@ -6,7 +6,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; const genericUpdateController: RequestHandler = async (request, response) => { const accountId = request.query.accountId as string; const update = getJSONfromString(request.body.toString()); - response.json(await updateGeneric(update, accountId)); + response.json(await updateGeneric(update, accountId)); }; export { genericUpdateController }; diff --git a/static/fixed_responses/aggregateSessions.json b/static/fixed_responses/aggregateSessions.json index 05b153122..1d1e7e528 100644 --- a/static/fixed_responses/aggregateSessions.json +++ b/static/fixed_responses/aggregateSessions.json @@ -1,4 +1,3 @@ { - "Results": [ - ] + "Results": [] }