ADD: added basic backend function plus a mockup for a cli interface

This commit is contained in:
2025-12-13 21:44:48 +01:00
parent c6de2481e6
commit a047d57824
21 changed files with 657 additions and 51 deletions

View File

@@ -17,7 +17,7 @@ type LoginRequest struct {
var secret = []byte("secret")
func LoginHandler(c *gin.Context, db *sql.DB) {
func Login(c *gin.Context, db *sql.DB) {
var req LoginRequest
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"})