Can get owner in getObject()

This commit is contained in:
Gucheng Wang 2022-10-10 20:55:20 +08:00
parent 4c7f6fda37
commit b832c304ae

View File

@ -63,11 +63,16 @@ func getObject(ctx *context.Context) (string, string) {
if method == http.MethodGet {
// query == "?id=built-in/admin"
id := ctx.Input.Query("id")
if id == "" {
return "", ""
if id != "" {
return util.GetOwnerAndNameFromId(id)
}
return util.GetOwnerAndNameFromId(id)
owner := ctx.Input.Query("owner")
if owner != "" {
return owner, ""
}
return "", ""
} else {
body := ctx.Input.RequestBody