aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/api.go
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-09-22 01:43:29 +0200
committerGitHub <noreply@github.com>2023-09-21 23:43:29 +0000
commit28f9b313bab420be8f42e546015312904311adba (patch)
treef3f09c6cef7bf96c7f390ba8e858cf80b0445581 /modules/context/api.go
parent7520cd678c3ef037db702296192d8664b6f02a54 (diff)
downloadgitea-28f9b313bab420be8f42e546015312904311adba.tar.gz
gitea-28f9b313bab420be8f42e546015312904311adba.zip
Updates to the API for archived repos (#27149)
Diffstat (limited to 'modules/context/api.go')
-rw-r--r--modules/context/api.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index 044ec51b56..a46af6ed78 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -101,6 +101,12 @@ type APIRedirect struct{}
// swagger:response string
type APIString string
+// APIRepoArchivedError is an error that is raised when an archived repo should be modified
+// swagger:response repoArchivedError
+type APIRepoArchivedError struct {
+ APIError
+}
+
// ServerError responds with error message, status is 500
func (ctx *APIContext) ServerError(title string, err error) {
ctx.Error(http.StatusInternalServerError, title, err)