Skip to content

Commit

Permalink
Merge pull request #147 from MintzyG/production
Browse files Browse the repository at this point in the history
Mudanças da production para a main
  • Loading branch information
MintzyG authored Sep 23, 2024
2 parents ccb2eee + 972d77c commit 8819973
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/database/activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func CreateActivity(a Activity) (int, error) {
query := `
INSERT INTO activities
(spots, activity_type, room, speaker, topic, description, time, day, time_stamp, image)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
RETURNING id
`
var id int
Expand Down
9 changes: 6 additions & 3 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ func main() {
mux := http.NewServeMux()
LoadRoutes(mux)

certFile := "/etc/letsencrypt/live/sctiuenf.com.br/fullchain.pem"
keyFile := "/etc/letsencrypt/live/sctiuenf.com.br/privkey.pem"

server := http.Server{
Addr: ":8080", // adicione :xx na URL do .env se a porta não for a padrão do protocolo
Addr: ":443",
Handler: middleware.EndpointLogging(mux),
}

fmt.Printf("Server Started at: %s\n", os.Getenv("URL"))
log.Fatal(server.ListenAndServe())
fmt.Printf("Server started at: %s\n", os.Getenv("URL"))
log.Fatal(server.ListenAndServeTLS(certFile, keyFile))
}
1 change: 0 additions & 1 deletion src/rotas/dashboard/qrcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func AllUsersSentQR(w http.ResponseWriter, r *http.Request) {
for _, user := range users {
qrSent, err := DB.IsUserQR(user.Email)
if err != nil {
fmt.Printf("Erro ao verificar status do QR para usuário %s: %v\n", user.Email, err)
Erros.LogError("dashboard/qrcode.go", fmt.Errorf("Erro ao verificar status do QR para usuário %s: %v\n", user.Email, err))
failedCount++
continue
Expand Down

0 comments on commit 8819973

Please sign in to comment.