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

[feat] 新增 find-task/apply/:taskId 幫手應徵功能 #123

Merged
merged 3 commits into from
May 21, 2023

Conversation

ColdingPoTaTo
Copy link
Collaborator

[feat] 新增 find-task/apply/:taskId 幫手應徵功能
[fix] findTaskDetails查無對應user帳號時,報錯40200

[fix] findTaskDetails查無對應user帳號時,報錯40200
@erik1110
Copy link
Owner

少了推播功能

@erik1110 erik1110 closed this May 19, 2023
@erik1110 erik1110 reopened this May 19, 2023
if (!task) {
return next(appError(400, '40212', '查無此任務'));
}
if (task.userId._id.toString() === userId) {
Copy link
Owner

Choose a reason for hiding this comment

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

userId 沒有 toString() 會錯嗎?

return next(appError(400, '40216', '無法應徵自己的任務'));
}
if (task.helpers.some((helper) => helper.helperId._id.toString() === userId)) {
return next(appError(400, '40217', '已應徵過此任務'));
Copy link
Owner

Choose a reason for hiding this comment

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

userId 沒有 toString() 會錯嗎?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

剛剛試了一下 沒轉型的話,比對永遠是false
你那邊有沒有類似的id比對,我想參考確認一下

[fix] 幫手應徵任務後,要發送通知給雙方
@ColdingPoTaTo ColdingPoTaTo linked an issue May 19, 2023 that may be closed by this pull request
@erik1110 erik1110 merged commit b5974ce into develop May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

F04 我要接案
2 participants