Skip to content

Commit

Permalink
Restore original statement
Browse files Browse the repository at this point in the history
And change variable name
  • Loading branch information
khkim6040 committed Feb 11, 2024
1 parent 017a269 commit f321347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/popo/reservation/equip/reserve.equip.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ export class ReserveEquipController {
} else {
if (reservation.booker_id == user.uuid) {
// if the reservation is in the past, deny delete
const reservation_time = reservation.date + reservation.start_time;
const reservation_start_time = reservation.date + reservation.start_time;
const current_time = moment().tz('Asia/Seoul').format('YYYYMMDDHHmm');

if (reservation_time < current_time) {
if (reservation_start_time < current_time) {
throw new BadRequestException('Cannot delete past reservation');
} else {
await this.reserveEquipService.remove(uuid);
Expand Down
2 changes: 1 addition & 1 deletion src/popo/reservation/place/reserve.place.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export class ReservePlaceController {
const reservation = await this.reservePlaceService.findOneByUuidOrFail(uuid);
const user = req.user;

if (false) {
if (user.userType == UserType.admin || user.userType == UserType.staff) {
await this.reservePlaceService.remove(uuid);
} else {
if (reservation.booker_id == user.uuid) {
Expand Down

0 comments on commit f321347

Please sign in to comment.