-
Notifications
You must be signed in to change notification settings - Fork 9
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
Routes #68
Routes #68
Conversation
@@ -0,0 +1,16 @@ | |||
|
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.
I don't think we want the docker-compose folder here
store/transport.go
Outdated
return base64.RawURLEncoding.EncodeToString(checkSum[:]) | ||
func generateID() string { | ||
uuidWithHyphen := uuid.New() | ||
return strings.Replace(uuidWithHyphen.String(), "-", "", -1) |
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.
We can keep the hyphens. They're URL safe and don't need encoding.
store/provide.go
Outdated
@@ -58,7 +61,8 @@ func Provide(unmarshaller config.Unmarshaller, in StoreIn) StoreOut { | |||
validateItemTTLConfig(&itemTTL) | |||
|
|||
return StoreOut{ | |||
SetItemHandler: newPushItemHandler(itemTTL, in.Store), | |||
PushItemHandler: newPushItemHandler(itemTTL, in.Store), | |||
SetItemHandler: newUpdateItemHandler(itemTTL, in.Store), |
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.
Might be a good idea to rename SetItemHandler
to UpdateItemHandler` for consistency.
Codecov Report
@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 40.05% 39.54% -0.52%
==========================================
Files 15 15
Lines 739 789 +50
==========================================
+ Hits 296 312 +16
- Misses 427 461 +34
Partials 16 16
Continue to review full report at Codecov.
|
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.
🎆
This PR:
PUT
creation route to aPOST
PUT
route to update a specific resourceFixes #65