Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix

kruzhambus89413f8e7c2b
diff --git a/src/project/project.controller.ts b/src/project/project.controller.ts
index e63c98a3a..6b5a4c7ee 100644
--- a/src/project/project.controller.ts
+++ b/src/project/project.controller.ts
@@ -556,13 +556,14 @@ export class ProjectController {
@Roles(UserType.CUSTOMER, UserType.ADMIN)
async deletePartially(
@Body() deleteDTO: PartialDeleteDTO,
+ @Param('id') id: string,
@CurrentUserId() uid: string,
): Promise<any> {
this.logger.log({ deleteDTO, uid }, 'DELETE /partially/:id')
- let { pid, from, to } = deleteDTO
+ let { from, to } = deleteDTO
- if (!isValidPID(pid)) {
+ if (!isValidPID(id)) {
throw new BadRequestException('The provided Project ID (pid) is incorrect')
}
@@ -580,7 +581,7 @@ export class ProjectController {
from = dayjs(from).format('YYYY-MM-DD')
to = dayjs(to).format('YYYY-MM-DD 23:59:59')
- const project = await this.projectService.findOne(pid, {
+ const project = await this.projectService.findOne(id, {
relations: ['admin', 'share'],
})
@@ -595,7 +596,7 @@ export class ProjectController {
const queryP = 'ALTER TABLE performance DELETE WHERE pid = {pid:FixedString(12)} AND created BETWEEN {from:String} AND {to:String}'
const params = {
params: {
- pid, from, to,
+ id, from, to,
},
}