26 lines
501 B
Go
26 lines
501 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/Neur0toxine/sshpoke/internal/config"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// @BasePath /api/v1
|
|
|
|
// Config returns app configuration.
|
|
//
|
|
// @Summary App configuration.
|
|
// @Schemes http
|
|
// @Description Prints app configuration in JSON format.
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Success 200 {object} config.Config
|
|
// @Failure 400
|
|
// @Router /config [get]
|
|
// @Security Bearer
|
|
func Config(c *gin.Context) {
|
|
c.JSON(http.StatusOK, config.Default)
|
|
}
|