Skip to content

Commit

Permalink
fix: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Nov 22, 2024
1 parent 6bdfe09 commit 7cb00c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineNuxtConfig({
compatibilityDate: '2024-07-01',
runtimeConfig: {
serverUrl: process.env.SERVER_URL || 'https://dash.globalping.io',
serverUrl: process.env.DASH_URL || 'https://dash.globalping.io',
public: {
gpAuthUrl: process.env.GP_API_URL || 'https://auth.globalping.io',
directusUrl: process.env.DIRECTUS_URL || 'https://dash-directus.globalping.io',
Expand Down Expand Up @@ -54,7 +54,7 @@ export default defineNuxtConfig({
},
$development: {
runtimeConfig: {
serverUrl: process.env.SERVER_URL || 'http://localhost:13010',
serverUrl: process.env.DASH_URL || 'http://localhost:13010',
public: {
gpAuthUrl: process.env.GP_API_URL || 'http://localhost:13110',
directusUrl: process.env.DIRECTUS_URL || 'http://localhost:18055',
Expand Down
4 changes: 2 additions & 2 deletions pages/probes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
query: { filter: { userId: { _eq: user.id } } },
aggregate: { count: '*' },
})),
$directus.request<[{ sum: { amount: number }, adopted_probe: number}]>(aggregate('gp_credits_additions', {
$directus.request<[{ sum: { amount: string }, adopted_probe: number}]>(aggregate('gp_credits_additions', {
query: { filter: { github_id: { _eq: user.external_identifier || 'admin' }, adopted_probe: { _null: false }, date_created: { _gte: '$NOW(-30 day)' } } },
groupBy: [ 'adopted_probe' ],
aggregate: { sum: 'amount' },
Expand All @@ -266,7 +266,7 @@
const { adopted_probe: adoptedProbe, sum: { amount } } = addition;
totalCredits.value += Number(amount);
creditsByProbeId[adoptedProbe] = creditsByProbeId[adoptedProbe] ? creditsByProbeId[adoptedProbe] + amount : amount;
creditsByProbeId[adoptedProbe] = creditsByProbeId[adoptedProbe] ? creditsByProbeId[adoptedProbe] + Number(amount) : amount;

Check failure on line 269 in pages/probes.vue

View workflow job for this annotation

GitHub Actions / build

Type 'string | number' is not assignable to type 'number'.
}
credits.value = creditsByProbeId;
Expand Down

0 comments on commit 7cb00c2

Please sign in to comment.