mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move POST /{username}/action/{action} to simply POST /{username} (#18045)
The current code unfortunately requires that `action` be a reserved repository name as it prevents posts to change the settings for action repositories. However, we can simply change action handler to work on POST /{username} instead. Fix #18037 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -66,12 +66,12 @@
|
||||
{{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
|
||||
<li class="follow">
|
||||
{{if $.IsFollowing}}
|
||||
<form method="post" action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}">
|
||||
<form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.i18n.Tr "user.unfollow"}}</button>
|
||||
</form>
|
||||
{{else}}
|
||||
<form method="post" action="{{.Link}}/action/follow?redirect_to={{$.Link}}">
|
||||
<form method="post" action="{{.Link}}?action=follow&redirect_to={{$.Link}}">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.i18n.Tr "user.follow"}}</button>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user