Fixed base path (again again again) and rewrote .env
This commit is contained in:
@@ -58,7 +58,7 @@ func assetsGet(w http.ResponseWriter, r *http.Request) {
|
||||
request.Find(&assets)
|
||||
|
||||
for _, asset := range assets {
|
||||
asset.Link = "/" + path.Join(config.Prefix, "assets", asset.Link)
|
||||
asset.Link = path.Join(config.Path, "assets", asset.Link)
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
@@ -101,7 +101,7 @@ func assetsPost(w http.ResponseWriter, r *http.Request) {
|
||||
json.NewEncoder(w).Encode(schema.Asset{
|
||||
Id: tmpDatabaseSchema.Id,
|
||||
Name: tmpDatabaseSchema.Name,
|
||||
Link: "/" + path.Join(config.Prefix, "assets", tmpDatabaseSchema.Link),
|
||||
Link: path.Join(config.Path, "assets", tmpDatabaseSchema.Link),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user