-
Notifications
You must be signed in to change notification settings - Fork 68
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
Feature/#168 儲存草稿 - usecase #192
Feature/#168 儲存草稿 - usecase #192
Conversation
Codecov Report
@@ Coverage Diff @@
## development #192 +/- ##
===============================================
+ Coverage 41.95% 45.55% +3.60%
===============================================
Files 24 25 +1
Lines 1237 1306 +69
===============================================
+ Hits 519 595 +76
+ Misses 637 624 -13
- Partials 81 87 +6
Continue to review full report at Codecov.
|
t.Errorf("returned unexpected value: got %v want value %v", | ||
actualValue, expectedValue) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeleteUserDraft 應該還是可以寫個test
測 return nil and error 兩個case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解,之後放假會另外補上
internal/usecase/user.go
Outdated
// TODO: https://github.com/Ptt-official-app/Ptt-backend/issues/168 | ||
return []byte{}, nil | ||
if !isValidDraftID([]byte(draftID)) { | ||
return []byte{}, fmt.Errorf("invalid draft ID: %s", draftID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要確認一下,有error的時候慣例上會回傳 nil 還是 []byte{} ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那就先統一改成回傳nil?
再麻煩幫忙 review,感謝 |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
👏 解決掉的 issue / Resolved Issues
⛏ 變更內容 / Details of Changes