Skip to content

Commit

Permalink
fixed a package.json issue and some spell typing weirdnes
Browse files Browse the repository at this point in the history
  • Loading branch information
benbot committed Nov 21, 2023
1 parent c868776 commit a5bbe62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/client/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-redux": "8.0.5",
"vite": "^4.4.9",
"@nx/vite": "^16.7.4",
"vite-plugin-dts": "^2.3.0",
"vite-plugin-dts": "^2.3.0"
},
"main": "./index.js",
"module": "./index.mjs",
Expand Down
8 changes: 4 additions & 4 deletions packages/server/core/src/services/agents/agents.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export class AgentService<

async get(agentId: string, params: ServiceParams) {
const db = app.get('dbClient')
const { currentReleaseVersion } = params.query
const currentReleaseVersionId = params.query?.currentReleaseVersionId

const query = super.createQuery(params)

if (agentId && !currentReleaseVersion) {
if (agentId && !currentReleaseVersionId) {
const count = await db('agentReleases').count('*').as('count').where('agent_id', '=', agentId)

if (count["count"] > 0) {
Expand All @@ -47,11 +47,11 @@ export class AgentService<
})
}

} else if(agentId && currentReleaseVersion) {
} else if(agentId && currentReleaseVersionId) {

query
.leftJoin('agentRelease as releases', function() {
this.on('agents.id', '=', 'agentReleases.agentId').andOn(currentReleaseVersion, '=', 'agentReleases.releaseVersion')
this.on('agents.id', '=', 'agentReleases.agentId').andOn(currentReleaseVersionId, '=', 'agentReleases.releaseVersion')
})
}

Expand Down
2 changes: 1 addition & 1 deletion packages/server/core/src/services/spells/spells.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SpellService<

async get(spellId: string, params: ServiceParams) {
const db = app.get('dbClient')
const { versionId } = params.query
const versionId = params.query?.versionId

const query = super.createQuery(params)

Expand Down

0 comments on commit a5bbe62

Please sign in to comment.