Compare commits

..

2 Commits

Author SHA1 Message Date
a9da570877 add prefix api_ to packages 2025-12-17 18:45:34 +02:00
b79450ecd4 add some info 2025-12-17 18:45:23 +02:00
4 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
// Package auth provides authentication-related API endpoints for the Triggersmith application.
// It handles login, logout, and user management operations.
package auth
package api_auth
import (
"net/http"

View File

@@ -6,7 +6,7 @@
// Example:
//
// /api/block/header would load the block located at {BlockDir}/header/
package block
package api_block
import (
"encoding/json"

View File

@@ -58,8 +58,8 @@ func (r *Router) MustRoute() chi.Router {
}
r.r.Route("/api", func(api chi.Router) {
api.Route("/block", block.MustRoute(r.cfg))
api.Route("/auth", auth.MustRoute(r.cfg))
api.Route("/block", api_block.MustRoute(r.cfg))
api.Route("/auth", api_auth.MustRoute(r.cfg))
})
r.r.Get("/health", func(w http.ResponseWriter, r *http.Request) {

View File

@@ -1,3 +1,6 @@
// The main file only starts cobra
// Copyright 2025 TriggerSmith Labs. All rights reserved.
package main
import (