|
@@ -7,8 +7,8 @@ import (
|
7
|
7
|
|
8
|
8
|
"./core/database"
|
9
|
9
|
"./core/errorHandler"
|
10
|
|
- req "./core/request"
|
11
|
|
- res "./core/response"
|
|
10
|
+ "./core/request"
|
|
11
|
+ "./core/response"
|
12
|
12
|
"./src/lib/auth"
|
13
|
13
|
)
|
14
|
14
|
|
|
@@ -20,12 +20,12 @@ func main() {
|
20
|
20
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
21
|
21
|
var Errors errorHandler.Errors
|
22
|
22
|
|
23
|
|
- res.SetResponseWriter(w)
|
24
|
|
- req.SetRequest(r)
|
|
23
|
+ response.SetResponseWriter(w)
|
|
24
|
+ request.SetRequest(r)
|
25
|
25
|
|
26
|
26
|
if !database.IsConnected {
|
27
|
27
|
Errors.InternalError("Conexão com a base de dados falhou!")
|
28
|
|
- res.JSON(Errors)
|
|
28
|
+ response.JSON(Errors)
|
29
|
29
|
return
|
30
|
30
|
}
|
31
|
31
|
|