26 lines
382 B
Go
26 lines
382 B
Go
|
package handler
|
||
|
|
||
|
import (
|
||
|
"nf-disk/internal/ndh"
|
||
|
)
|
||
|
|
||
|
func ConnectionTest(c *ndh.Ctx) error {
|
||
|
type Req struct {
|
||
|
Name string `json:"name"`
|
||
|
Endpoint string `json:"endpoint"`
|
||
|
Access string `json:"access"`
|
||
|
Key string `json:"key"`
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
err error
|
||
|
req = new(Req)
|
||
|
)
|
||
|
|
||
|
if err = c.ReqParse(req); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return c.Send200("test success")
|
||
|
}
|