Skip to content

Commit

Permalink
✔ Fix Default ~
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed Sep 4, 2024
1 parent ad6cdd0 commit 1ae4ff3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/main-site/server/main.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions projects/main-site/src/api/middlewares/register.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ export class RegisterMiddleware implements NestMiddleware {

async use(@Req() req: Request, @Res({ passthrough: true }) res: Response, @Next() next: NextFunction): Promise<void | Response<any, Record<string, any>>> {
try {
const st = '23:00:00';
const et = '03:00:00';
const freeTime = this.gs.isFreeTime(st, et);
const freeTime = this.gs.isFreeTime();
if (!(await this.cfgServerGetOpenForRegister()) || freeTime) {
throw new HttpException({
info: '😫 403 - Register API :: Tidak Ada Layanan 💩',
result: {
message: `Pendaftaran Sedang Ditutup!${freeTime ? ` (${st} ~ ${et} [JST/UTC+9])` : ''}`
message: `Pendaftaran Sedang Ditutup!${freeTime ? ` (${CONSTANTS.freeTimeStart} ~ ${CONSTANTS.freeTimeEnd} [JST/UTC+9])` : ''}`
}
}, HttpStatus.FORBIDDEN);
} else if (
Expand Down

0 comments on commit 1ae4ff3

Please sign in to comment.