File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 99 "net/http"
1010
1111 "code.gitea.io/gitea/models"
12+ "code.gitea.io/gitea/models/db"
1213 "code.gitea.io/gitea/modules/context"
1314 "code.gitea.io/gitea/modules/convert"
1415 "code.gitea.io/gitea/routers/api/v1/utils"
@@ -55,7 +56,7 @@ func StartIssueStopwatch(ctx *context.APIContext) {
5556 return
5657 }
5758
58- if err := models .CreateOrStopIssueStopwatch ( ctx .User , issue ); err != nil {
59+ if err := models .CreateIssueStopwatch ( db . DefaultContext , ctx .User , issue ); err != nil {
5960 ctx .Error (http .StatusInternalServerError , "CreateOrStopIssueStopwatch" , err )
6061 return
6162 }
@@ -104,7 +105,7 @@ func StopIssueStopwatch(ctx *context.APIContext) {
104105 return
105106 }
106107
107- if err := models .CreateOrStopIssueStopwatch ( ctx .User , issue ); err != nil {
108+ if err := models .FinishIssueStopwatch ( db . DefaultContext , ctx .User , issue ); err != nil {
108109 ctx .Error (http .StatusInternalServerError , "CreateOrStopIssueStopwatch" , err )
109110 return
110111 }
You can’t perform that action at this time.
0 commit comments