Skip to content

Commit

Permalink
fix: fix types errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rybasher committed May 9, 2024
1 parent 8fb818d commit 0b45d39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const Piscina = require('piscina')
const os = require('os')
const { ObjectId } = require('mongodb')

// @ts-ignore
const piscina = new Piscina({
filename: path.resolve(
__dirname,
Expand Down
4 changes: 3 additions & 1 deletion mirror-web-server/src/block/block.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export class BlockService {
}

remove(id: string): Promise<BlockDocument> {
return this.blockModel.findOneAndDelete({ _id: id }).exec()
return this.blockModel
.findOneAndDelete({ _id: id })
.exec() as any as Promise<BlockDocument>
}
}
2 changes: 1 addition & 1 deletion mirror-web-server/src/space/space.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ export class SpaceService implements IRoleConsumer {
} else {
throw new NotFoundException()
}
})
}) as any as Promise<SpaceDocument>
} else {
this.logger.log(
`canRemoveWithRolesCheck failed for user: ${userId}`,
Expand Down
4 changes: 3 additions & 1 deletion mirror-web-server/src/tag/tag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ export class TagService {
}

remove(id: string): Promise<TagDocument> {
return this.tagModel.findOneAndDelete({ _id: id }).exec()
return this.tagModel
.findOneAndDelete({ _id: id })
.exec() as any as Promise<TagDocument>
}
}

0 comments on commit 0b45d39

Please sign in to comment.