Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Go Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'

- name: Test
run: go test ./...
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ go.work.sum
.vscode/
*.~

# Database files
api/*.db

1 change: 0 additions & 1 deletion api/contest.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package api
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"net/http"
)
Expand Down
2 changes: 1 addition & 1 deletion api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (api *ApiContext) createUser(w http.ResponseWriter, r *http.Request) {

// Obtener el ID del usuario recién insertado
if id, err := res.LastInsertId(); err == nil {
new_user.User_ID = int(id)
new_user.UserID = int(id)
}

w.Header().Set("Content-Type", "application/json")
Expand Down
Loading