mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
change interface{} to any, move apiError function to bottom
This commit is contained in:
parent
33ae3bd5ce
commit
94f45f402f
@ -18,6 +18,12 @@ import (
|
||||
arch_service "code.gitea.io/gitea/services/packages/arch"
|
||||
)
|
||||
|
||||
func apiError(ctx *context.Context, status int, obj any) {
|
||||
helper.LogAndProcessError(ctx, status, obj, func(message string) {
|
||||
ctx.PlainText(status, message)
|
||||
})
|
||||
}
|
||||
|
||||
// Push new package to arch package registry.
|
||||
func Push(ctx *context.Context) {
|
||||
var (
|
||||
@ -185,9 +191,3 @@ func Remove(ctx *context.Context) {
|
||||
|
||||
ctx.Status(http.StatusOK)
|
||||
}
|
||||
|
||||
func apiError(ctx *context.Context, status int, obj interface{}) {
|
||||
helper.LogAndProcessError(ctx, status, obj, func(message string) {
|
||||
ctx.PlainText(status, message)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user