Skip to content

Commit

Permalink
Copy of main branch (#1931)
Browse files Browse the repository at this point in the history
<!--
Thanks for opening a PR! Your contribution is much appreciated!
-->

## Bug

- [ ] Related issues linked using `closes: #number`

## Feature

- [ ] Related issues linked using `closes: #number`
- [ ] There is only 1 db migration with no breaking changes.

## Translations

- [ ] `.json` files are formatted: `pnpm format`
- [ ] Translations are correct
- [ ] New translation? It's been added to `i18n.config.mjs`

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: casperiv0 <[email protected]>
Co-authored-by: Whitigol <[email protected]>
  • Loading branch information
4 people authored May 28, 2024
1 parent 301f6ad commit d7456ff
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: styfle/[email protected].0
- uses: styfle/[email protected].1
with:
# `60597620` = Chromatic
# `14026219` = Lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-builds-typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand Down
6 changes: 4 additions & 2 deletions apps/api/src/controllers/record/records-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export class RecordsController {
});

const draftRecords = await prisma.record.findMany({
// todo: visualize in the FE
take: 12,
where: {
publishStatus: "DRAFT",
Expand Down Expand Up @@ -501,7 +500,10 @@ export class RecordsController {
},
});

await this.handleDiscordWebhook(recordItem as any);
// Only send a Discord webhook if the record is published
if (recordItem.publishStatus === PublishStatus.PUBLISHED) {
await this.handleDiscordWebhook(recordItem as any);
}

return recordItem;
}
Expand Down
18 changes: 17 additions & 1 deletion apps/client/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ const nextConfig = {
// prettier-ignore
images: { // start images
formats: ["image/avif", "image/webp"],
domains: ["i.imgur.com", "cdn.discordapp.com", "localhost"]
remotePatterns: [
{
protocol: "https",
hostname: "i.imgur.com",
pathname: "**"
},
{
protocol: "https",
hostname: "cdn.discordapp.com",
pathname: "**"
},
{
protocol: "http",
hostname: "localhost",
pathname: "**"
},
]
}, // end images
// prettier-enable
webpack(config, { webpack }) {
Expand Down
2 changes: 1 addition & 1 deletion apps/client/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const DOB_2 = "1953-10-21";

describe("calculateAge", () => {
test("Should correctly calculate age", () => {
expect(calculateAge(DOB_1)).toMatchInlineSnapshot('"24"');
expect(calculateAge(DOB_1)).toMatchInlineSnapshot('"25"');
});

test("Should correctly calculate age", () => {
Expand Down

0 comments on commit d7456ff

Please sign in to comment.