style: shorten name operations to op

This commit is contained in:
Noah Hsu
2022-08-31 21:01:15 +08:00
parent 9ec6d5be7a
commit 7ac1d14eeb
35 changed files with 110 additions and 110 deletions

View File

@ -3,22 +3,22 @@ package handles
import (
"fmt"
"github.com/alist-org/alist/v3/internal/operations"
"github.com/alist-org/alist/v3/internal/op"
"github.com/alist-org/alist/v3/server/common"
"github.com/gin-gonic/gin"
)
func ListDriverInfo(c *gin.Context) {
common.SuccessResp(c, operations.GetDriverInfoMap())
common.SuccessResp(c, op.GetDriverInfoMap())
}
func ListDriverNames(c *gin.Context) {
common.SuccessResp(c, operations.GetDriverNames())
common.SuccessResp(c, op.GetDriverNames())
}
func GetDriverInfo(c *gin.Context) {
driverName := c.Query("driver")
infoMap := operations.GetDriverInfoMap()
infoMap := op.GetDriverInfoMap()
items, ok := infoMap[driverName]
if !ok {
common.ErrorStrResp(c, fmt.Sprintf("driver [%s] not found", driverName), 404)