Skip to content

Commit

Permalink
🔨 minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Feb 23, 2024
1 parent 8c71da0 commit c538a40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adminSiteServer/apiRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ apiRouter.get(
)

apiRouter.get("/datasets.json", async (req) => {
await db.knexInstance().transaction(
return db.knexInstance().transaction(
async (trx) => {
const datasets = await db.knexRaw<Record<string, any>>(
`
Expand Down Expand Up @@ -1658,7 +1658,7 @@ apiRouter.get("/datasets.json", async (req) => {
apiRouter.get("/datasets/:datasetId.json", async (req: Request) => {
const datasetId = expectInt(req.params.datasetId)

await db.knexInstance().transaction(
return db.knexInstance().transaction(
async (trx) => {
const dataset = await db.knexRawFirst<Record<string, any>>(
`
Expand Down Expand Up @@ -2329,7 +2329,7 @@ apiRouter.post("/posts/:postId/unlinkGdoc", async (req: Request) => {

apiRouter.get("/sources/:sourceId.json", async (req: Request) => {
const sourceId = expectInt(req.params.sourceId)
db.knexInstance().transaction(
return db.knexInstance().transaction(
async (trx) => {
const source = await db.knexRawFirst<Record<string, any>>(
`
Expand Down
1 change: 1 addition & 0 deletions adminSiteServer/exportGitData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const main = async () => {
if (!dataset.isPrivate && !dataset.nonRedistributable)
await syncDatasetToGitRepo(knex, dataset.id, { commitOnly: true })
}
await db.closeTypeOrmAndKnexConnections()
}

main()

0 comments on commit c538a40

Please sign in to comment.