Skip to content

Commit

Permalink
wip: docker compose
Browse files Browse the repository at this point in the history
Signed-off-by: Jad Chahed <[email protected]>
  • Loading branch information
Jad31 committed Aug 30, 2024
1 parent d5f42f3 commit 4fe0bf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Dockerfile.admin
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /arewefastyetcli ./go/main.go

FROM debian:bookworm AS run-stage

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --reinstall ca-certificates \
&& update-ca-certificates

# Copy the source code to the working directory
COPY --from=build-stage /arewefastyetcli /arewefastyetcli
COPY --from=build-stage /build/go/admin/templates/ /go/admin/templates/
Expand Down
2 changes: 1 addition & 1 deletion go/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func (s *Server) addExecutions(c *gin.Context) {
isUserAuthenticated, err := IsUserAuthenticated(decryptedToken)

if err != nil || !isUserAuthenticated {
c.JSON(http.StatusUnauthorized, &ErrorAPI{Error: "Unauthorized"})
c.JSON(http.StatusUnauthorized, &ErrorAPI{Error: "isUserAuthenticated Unauthorized"})
return
}

Expand Down
2 changes: 0 additions & 2 deletions go/tools/server/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ import (
"encoding/hex"
"fmt"
"io"
"log"
)

const (
ErrorIncorrectConfiguration = "incorrect configuration"
)

func Encrypt(stringToEncrypt string, keyString string) (string, error) {
log.Println(stringToEncrypt, keyString)
key, _ := hex.DecodeString(keyString)
plaintext := []byte(stringToEncrypt)

Expand Down

0 comments on commit 4fe0bf0

Please sign in to comment.