You've already forked directdnsonly-go
21 lines
552 B
Go
21 lines
552 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/guisea/directdnsonly/internal/responses"
|
|
"github.com/guisea/directdnsonly/internal/util"
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
// Login - LoginTest endpoint allows DirectAdmin to check login details
|
|
// As we have set Basic Auth middleware just returns message
|
|
func LoginTest(c echo.Context) error {
|
|
// Construct a response
|
|
resp := responses.DAResponse{}
|
|
resp.Error = 0
|
|
resp.Message = "Login OK"
|
|
// Returns the response to the client
|
|
return c.String(http.StatusOK, util.EncodeQueryString(resp))
|
|
}
|