Skip to content

Commit

Permalink
Apps URLs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokinmax committed Mar 5, 2024
1 parent 490de80 commit 3e063a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WORKDIR /astore
COPY --from=build /astore /astore/astore
COPY --from=build /src/cmd/astore/views /astore/views
COPY --from=build /src/cmd/astore/data /astore/data
RUN mkdir -p /astore/apps && mkdir -p /astore/tmp
RUN mkdir -p /astore/data/apps && mkdir -p /astore/tmp

EXPOSE 80
ENTRYPOINT ["/astore/astore"]
4 changes: 2 additions & 2 deletions internal/api/private.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ func PostApkHandler(ctx *gin.Context) {

//log.Println(file.Filename)

err = ctx.SaveUploadedFile(file, "./apps/"+file.Filename)
err = ctx.SaveUploadedFile(file, "./data/apps/"+file.Filename)
if err != nil {
log.Fatal(err)
}

app := apk.ApkProcessor("./apps", file.Filename)
app := apk.ApkProcessor("./data/apps", file.Filename)

if globals.Config.BotToken != "" && globals.Config.ChatID != 0 {
msg := fmt.Sprintf("New build %s %s is ready", app.AppLabel, app.VersionName)
Expand Down
2 changes: 1 addition & 1 deletion internal/apk/apk.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ func moveFile(source string, destination string) {
}

func GetAPKURL(apk models.Apk) (URL string) {
URL = fmt.Sprintf("%s/apk/%s/%s", globals.Config.Url, apk.SHA256, apk.FileName)
URL = fmt.Sprintf("%s/apps/%s/%s", globals.Config.Url, apk.SHA256, apk.FileName)
return URL
}
2 changes: 1 addition & 1 deletion internal/globals/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package globals
// SERVICE DESCRIPTION
const ServiceFriendlyName = "Android store"
const ServiceName = "android-store"
const Version = "1.1.3"
const Version = "1.1.4"

// ENVIRONMENT VARIABLES CONFIGURATION STRUCTURE
type ConfigStruct struct {
Expand Down

0 comments on commit 3e063a3

Please sign in to comment.