Skip to content

Commit

Permalink
status è pubblico
Browse files Browse the repository at this point in the history
  • Loading branch information
michelangelomo committed Jan 25, 2025
1 parent 29dde41 commit 80f54f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
backend/sede.db
backend/database/
.env
**/*.env.unenc
# age encryption key
Expand Down
2 changes: 1 addition & 1 deletion backend/deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.8'

services:
manager:
sede:
image: ghcr.io/metro-olografix/sede:dev
restart: unless-stopped
pull_policy: always
Expand Down
5 changes: 3 additions & 2 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ func (app *App) setupRouter() *gin.Engine {
r.Use(gin.Logger())
}

r.GET("/status", app.getStatus)
r.GET("/stats", app.getStats)

// Authenticated routes
secured := r.Group("/")
secured.Use(app.authMiddleware())
{
secured.GET("/status", app.getStatus)
secured.POST("/toggle", app.toggleStatus)
secured.GET("/stats", app.getStats)
}

return r
Expand Down

0 comments on commit 80f54f9

Please # to comment.