Skip to content

Commit 8819973

Browse files
authored
Merge pull request #147 from MintzyG/production
Mudanças da production para a main
2 parents ccb2eee + 972d77c commit 8819973

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/database/activities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func CreateActivity(a Activity) (int, error) {
102102
query := `
103103
INSERT INTO activities
104104
(spots, activity_type, room, speaker, topic, description, time, day, time_stamp, image)
105-
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
105+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
106106
RETURNING id
107107
`
108108
var id int

src/main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ func main() {
2929
mux := http.NewServeMux()
3030
LoadRoutes(mux)
3131

32+
certFile := "/etc/letsencrypt/live/sctiuenf.com.br/fullchain.pem"
33+
keyFile := "/etc/letsencrypt/live/sctiuenf.com.br/privkey.pem"
34+
3235
server := http.Server{
33-
Addr: ":8080", // adicione :xx na URL do .env se a porta não for a padrão do protocolo
36+
Addr: ":443",
3437
Handler: middleware.EndpointLogging(mux),
3538
}
3639

37-
fmt.Printf("Server Started at: %s\n", os.Getenv("URL"))
38-
log.Fatal(server.ListenAndServe())
40+
fmt.Printf("Server started at: %s\n", os.Getenv("URL"))
41+
log.Fatal(server.ListenAndServeTLS(certFile, keyFile))
3942
}

src/rotas/dashboard/qrcode.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ func AllUsersSentQR(w http.ResponseWriter, r *http.Request) {
4949
for _, user := range users {
5050
qrSent, err := DB.IsUserQR(user.Email)
5151
if err != nil {
52-
fmt.Printf("Erro ao verificar status do QR para usuário %s: %v\n", user.Email, err)
5352
Erros.LogError("dashboard/qrcode.go", fmt.Errorf("Erro ao verificar status do QR para usuário %s: %v\n", user.Email, err))
5453
failedCount++
5554
continue

0 commit comments

Comments
 (0)