babillard/handlers/handlers.go
Victor Lacasse-Beaudoin 17de134f76 Déplacer functions de serverCmd vers data/ et handlers/
Déplacer ListContenu vers data/

Déplacer handlers / et /api vers handlers/handlers.go

Déplacer handlers /api/contenu vers handlers/contenu.go
2023-05-05 18:59:53 -04:00

21 lines
506 B
Go

package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
)
func HandleAPIShow(c echo.Context) error {
apispec := `agecem/babillard
API Specifications
-----
'/' | GET | Affiche l'application 'slider'
'/api' | GET | Affiche les spécifications API
'/api/contenu' | GET | Affiche le nom des fichiers dans 'contenu/'
'/api/contenu/{filename}' | GET | Affiche le fichier 'contenu/{filename}'
-----`
return c.String(http.StatusOK, apispec)
}