style: shorten name operations
to op
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user