File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 9
9
"net/http"
10
10
11
11
"code.gitea.io/gitea/models"
12
+ "code.gitea.io/gitea/models/db"
12
13
"code.gitea.io/gitea/modules/context"
13
14
"code.gitea.io/gitea/modules/convert"
14
15
"code.gitea.io/gitea/routers/api/v1/utils"
@@ -55,7 +56,7 @@ func StartIssueStopwatch(ctx *context.APIContext) {
55
56
return
56
57
}
57
58
58
- if err := models .CreateOrStopIssueStopwatch ( ctx .User , issue ); err != nil {
59
+ if err := models .CreateIssueStopwatch ( db . DefaultContext , ctx .User , issue ); err != nil {
59
60
ctx .Error (http .StatusInternalServerError , "CreateOrStopIssueStopwatch" , err )
60
61
return
61
62
}
@@ -104,7 +105,7 @@ func StopIssueStopwatch(ctx *context.APIContext) {
104
105
return
105
106
}
106
107
107
- if err := models .CreateOrStopIssueStopwatch ( ctx .User , issue ); err != nil {
108
+ if err := models .FinishIssueStopwatch ( db . DefaultContext , ctx .User , issue ); err != nil {
108
109
ctx .Error (http .StatusInternalServerError , "CreateOrStopIssueStopwatch" , err )
109
110
return
110
111
}
You can’t perform that action at this time.
0 commit comments