feat(channels): 渠道管理 - 可视化排序与别名并修复注册及外观清理 (#444)

This commit is contained in:
Ray authored and GitHub committed 2026-09-08 20:56:42 +08:00
1 parent 381edf37e3
commit 8360b2c933
41 files changed
+1485 -148

No files matched your search

+7
View File
@@ -4,6 +4,7 @@ import (
"errors"
"log"
"net/http"
"strconv"
"strings"
"infinite-canvas/backend/internal/service"
@@ -27,6 +28,12 @@ func fail(c *gin.Context, status int, err error) {
}
func failService(c *gin.Context, err error) {
var cooldown *service.EmailCodeCooldownError
if errors.As(err, &cooldown) {
c.Header("Retry-After", strconv.Itoa(cooldown.Seconds))
fail(c, http.StatusTooManyRequests, cooldown)
return
}
var appErr *service.AppError
if errors.As(err, &appErr) && validErrorStatus(appErr.Status) {
code := appErr.Code