-
Notifications
You must be signed in to change notification settings - Fork 4
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: transfer initiation #96
Conversation
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
…ting Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
internal/app/api/connector.go
Outdated
@@ -185,7 +185,7 @@ func uninstall[Config models.ConnectorConfigObject](connectorManager *integratio | |||
func install[Config models.ConnectorConfigObject](connectorManager *integration.ConnectorManager[Config], | |||
) http.HandlerFunc { | |||
return func(w http.ResponseWriter, r *http.Request) { | |||
installed, err := connectorManager.IsInstalled(context.Background()) | |||
installed, err := connectorManager.IsInstalled(context.TODO()) |
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.
Better to use request context to be able to trace calls (sorry i should have said this on previous PR)
internal/app/api/connector.go
Outdated
@@ -222,7 +222,7 @@ func install[Config models.ConnectorConfigObject](connectorManager *integration. | |||
func reset[Config models.ConnectorConfigObject](connectorManager *integration.ConnectorManager[Config], | |||
) http.HandlerFunc { | |||
return func(w http.ResponseWriter, r *http.Request) { | |||
installed, err := connectorManager.IsInstalled(context.Background()) | |||
installed, err := connectorManager.IsInstalled(context.TODO()) |
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.
same
Codecov Report
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 18.94% 17.63% -1.31%
==========================================
Files 106 112 +6
Lines 4889 5307 +418
==========================================
+ Hits 926 936 +10
- Misses 3857 4264 +407
- Partials 106 107 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
internal/app/api/router.go
Outdated
@@ -73,6 +74,8 @@ func connectorRouter[Config models.ConnectorConfigObject]( | |||
addRoute(r, provider, "/reset", http.MethodPost, reset(manager)) | |||
addRoute(r, provider, "/tasks", http.MethodGet, listTasks(manager)) | |||
addRoute(r, provider, "/tasks/{taskID}", http.MethodGet, readTask(manager)) | |||
addRoute(r, provider, "/transfer", http.MethodPost, initiateTransfer(manager)) |
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.
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
# Conflicts: # swagger.yml
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
No description provided.