mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 20:50:56 +01:00
add download, fix empty apicontext, add url to describe
This commit is contained in:
@@ -49,6 +49,7 @@ type Upload struct {
|
||||
Members []string `json:"members"` // contains multiple files, so File is an archive
|
||||
Uploaded Timestamp `json:"uploaded"`
|
||||
Context string `json:"context"`
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
// this one is also used for marshalling to the client
|
||||
@@ -170,5 +171,10 @@ func GetApicontext(c *fiber.Ctx) (string, error) {
|
||||
return "", fmt.Errorf("Unable to initialize session store from context: " + err.Error())
|
||||
}
|
||||
|
||||
return sess.Get("apicontext").(string), nil
|
||||
apicontext := sess.Get("apicontext")
|
||||
if apicontext != nil {
|
||||
return apicontext.(string), nil
|
||||
}
|
||||
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user