diff --git a/.gitignore b/.gitignore index 50c3d9a..9943d1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env *.exe server +prompt-generator diff --git a/frontend/settings.html b/frontend/settings.html index 192e5e6..86adbd8 100644 --- a/frontend/settings.html +++ b/frontend/settings.html @@ -49,6 +49,14 @@ + +
+
🏷️ 系统标签管理
+
+
加载中...
+
+
+
🔐 账号
@@ -60,6 +68,11 @@ diff --git a/internal/handlers/tags.go b/internal/handlers/tags.go index b477026..5701cab 100644 --- a/internal/handlers/tags.go +++ b/internal/handlers/tags.go @@ -70,14 +70,6 @@ func UpdateTag(w http.ResponseWriter, r *http.Request) { return } - // Check ownership - var scope string - db.DB.QueryRow("SELECT scope FROM tags WHERE id=?", id).Scan(&scope) - if scope != "personal" { - fail(w, 403, "不能修改系统标签") - return - } - var req struct { Name string `json:"name"` Description string `json:"description"` @@ -102,13 +94,6 @@ func DeleteTag(w http.ResponseWriter, r *http.Request) { return } - var scope string - db.DB.QueryRow("SELECT scope FROM tags WHERE id=?", id).Scan(&scope) - if scope != "personal" { - fail(w, 403, "不能删除系统标签") - return - } - // Delete options first db.DB.Exec("DELETE FROM tag_options WHERE tag_id=?", id) db.DB.Exec("DELETE FROM tags WHERE id=?", id)