Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: prevent from reserving invalid date - YYYY-MM-00 #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marvelcn015
Copy link

No description provided.

Copy link

linear bot commented Dec 12, 2024

@marvelcn015 marvelcn015 linked an issue Dec 12, 2024 that may be closed by this pull request
@@ -131,6 +135,12 @@ router.post('/reserve', async function (req, res, next) {
if (!SUBMIT_DATETIME_REGEXP.test(space_reservation.end_datetime)) {
error_message += 'space_reservations end_datetime format error\n'
}
if (!isValidDate(space_reservation.start_datetime)) {
Copy link
Contributor

@nickchengtw nickchengtw Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

檢查預約項目的部分能不能統一使用 validate_item_reservation.jsvalidate_space_reservation.js ?
像 PUT /reserve 那樣
@Chun-Cheng 覺得呢?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,有現有的就用吧

@nickchengtw
Copy link
Contributor

問題修正或調整應該使用 patch 標籤而不是 minor?
https://blog.niclin.tw/2019/03/14/%E9%81%B5%E5%BE%AA-semantic-versioning-%E8%BB%9F%E9%AB%94%E9%96%8B%E7%99%BC%E8%AA%9E%E6%84%8F%E5%8C%96%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/

@marvelcn015 marvelcn015 added patch and removed minor labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2024-11-00 日可以預約
3 participants