Files
directdnsonly-go/internal/handlers/LoginTest.go
2024-01-17 15:56:44 +13:00

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))
}