mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Enable Uploading/Removing Attachments When Editing an Issue/Comment (#8426)
This commit is contained in:
		| @@ -513,8 +513,9 @@ func RegisterRoutes(m *macaron.Macaron) { | ||||
| 		}) | ||||
| 	}, ignSignIn) | ||||
|  | ||||
| 	m.Group("", func() { | ||||
| 		m.Post("/attachments", repo.UploadAttachment) | ||||
| 	m.Group("/attachments", func() { | ||||
| 		m.Post("", repo.UploadAttachment) | ||||
| 		m.Post("/delete", repo.DeleteAttachment) | ||||
| 	}, reqSignIn) | ||||
|  | ||||
| 	m.Group("/:username", func() { | ||||
| @@ -710,6 +711,7 @@ func RegisterRoutes(m *macaron.Macaron) { | ||||
| 				m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeIssueReaction) | ||||
| 				m.Post("/lock", reqRepoIssueWriter, bindIgnErr(auth.IssueLockForm{}), repo.LockIssue) | ||||
| 				m.Post("/unlock", reqRepoIssueWriter, repo.UnlockIssue) | ||||
| 				m.Get("/attachments", repo.GetIssueAttachments) | ||||
| 			}, context.RepoMustNotBeArchived()) | ||||
|  | ||||
| 			m.Post("/labels", reqRepoIssuesOrPullsWriter, repo.UpdateIssueLabel) | ||||
| @@ -721,6 +723,7 @@ func RegisterRoutes(m *macaron.Macaron) { | ||||
| 			m.Post("", repo.UpdateCommentContent) | ||||
| 			m.Post("/delete", repo.DeleteComment) | ||||
| 			m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeCommentReaction) | ||||
| 			m.Get("/attachments", repo.GetCommentAttachments) | ||||
| 		}, context.RepoMustNotBeArchived()) | ||||
| 		m.Group("/labels", func() { | ||||
| 			m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user