LPM-81: Assign to me
This commit is contained in:
@@ -196,7 +196,12 @@ func UpdateIssue(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func UpdateAssignee(w http.ResponseWriter, r *http.Request) {
|
||||
issue := r.Context().Value(issueKey).(*models.Issue)
|
||||
assignee := r.FormValue("assignee")
|
||||
assignMe := r.FormValue("assign_me")
|
||||
|
||||
assignee := ""
|
||||
if assignMe != "" {
|
||||
assignee = "Me"
|
||||
}
|
||||
|
||||
if err := App(r).Issues.UpdateIssue(r.Context(), issue.ID, map[string]any{"assignee": assignee}, ""); err != nil {
|
||||
http.Error(w, "Failed to update assignee", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user