MCPcopy
hub / github.com/IceWhaleTech/CasaOS / ListDriverInfo

Function ListDriverInfo

route/v1/driver.go:12–34  ·  view source on GitHub ↗
(ctx echo.Context)

Source from the content-addressed store, hash-verified

10)
11
12func ListDriverInfo(ctx echo.Context) error {
13 list := []model.Drive{}
14
15 google := google_drive.GetConfig()
16 list = append(list, model.Drive{
17 Name: "Google Drive",
18 Icon: google.Icon,
19 AuthUrl: google.AuthUrl,
20 })
21 dp := dropbox.GetConfig()
22 list = append(list, model.Drive{
23 Name: "Dropbox",
24 Icon: dp.Icon,
25 AuthUrl: dp.AuthUrl,
26 })
27 od := onedrive.GetConfig()
28 list = append(list, model.Drive{
29 Name: "OneDrive",
30 Icon: od.Icon,
31 AuthUrl: od.AuthUrl,
32 })
33 return ctx.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: list})
34}

Callers

nothing calls this directly

Calls 3

GetConfigFunction · 0.92
GetConfigFunction · 0.92
GetConfigFunction · 0.92

Tested by

no test coverage detected