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

API: only overwrite specific worker fields when worker already exists #236

Merged
merged 3 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't forget to return when creating new worker
edigaryev committed Jan 16, 2025
commit 7139222724b82ed582a19fa55d00c58b49d8020d
2 changes: 2 additions & 0 deletions internal/controller/api_workers.go
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ func (controller *Controller) createWorker(ctx *gin.Context) responder.Responder
if err := txn.SetWorker(worker); err != nil {
return responder.Error(err)
}

return responder.JSON(200, worker)
}

controller.logger.Errorf("failed to check if the worker "+