Go: remove unused API route (#14028)

### What problem does this PR solve?

As title

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-04-10 18:00:41 +08:00
committed by GitHub
parent 3d59448b0d
commit cfc2928de2
4 changed files with 65 additions and 94 deletions

View File

@@ -34,7 +34,7 @@ import (
// @Produce json
// @Security ApiKeyAuth
// @Success 200 {object} map[string]interface{}
// @Router /v1/system/token_list [get]
// @Router /api/v1/system/tokens [get]
func (h *SystemHandler) ListTokens(c *gin.Context) {
// Get current user from context
user, exists := c.Get("user")
@@ -94,7 +94,7 @@ func (h *SystemHandler) ListTokens(c *gin.Context) {
// @Security ApiKeyAuth
// @Param name query string false "Name of the token"
// @Success 200 {object} map[string]interface{}
// @Router /v1/system/new_token [post]
// @Router /api/v1/system/tokens [post]
func (h *SystemHandler) CreateToken(c *gin.Context) {
// Get current user from context
user, exists := c.Get("user")
@@ -164,7 +164,7 @@ func (h *SystemHandler) CreateToken(c *gin.Context) {
// @Security ApiKeyAuth
// @Param token path string true "The API token to remove"
// @Success 200 {object} map[string]interface{}
// @Router /v1/system/token/{token} [delete]
// @Router /api/v1/system/tokens/{token} [delete]
func (h *SystemHandler) DeleteToken(c *gin.Context) {
// Get current user from context
user, exists := c.Get("user")