|
|
@ -110,8 +110,8 @@ export class ActivitiesController { |
|
|
|
|
|
|
|
|
if (!activity) { |
|
|
if (!activity) { |
|
|
throw new HttpException( |
|
|
throw new HttpException( |
|
|
getReasonPhrase(StatusCodes.FORBIDDEN), |
|
|
getReasonPhrase(StatusCodes.NOT_FOUND), |
|
|
StatusCodes.FORBIDDEN |
|
|
StatusCodes.NOT_FOUND |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -298,7 +298,8 @@ export class ActivitiesController { |
|
|
@Body() data: UpdateOrderDto |
|
|
@Body() data: UpdateOrderDto |
|
|
) { |
|
|
) { |
|
|
const originalActivity = await this.activitiesService.order({ |
|
|
const originalActivity = await this.activitiesService.order({ |
|
|
id |
|
|
id, |
|
|
|
|
|
userId: this.request.user.id |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (!originalActivity) { |
|
|
if (!originalActivity) { |
|
|
@ -308,13 +309,6 @@ export class ActivitiesController { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (originalActivity.userId !== this.request.user.id) { |
|
|
|
|
|
throw new HttpException( |
|
|
|
|
|
getReasonPhrase(StatusCodes.FORBIDDEN), |
|
|
|
|
|
StatusCodes.FORBIDDEN |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const date = parseISO(data.date); |
|
|
const date = parseISO(data.date); |
|
|
|
|
|
|
|
|
const accountId = data.accountId; |
|
|
const accountId = data.accountId; |
|
|
|