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 { if method == http.MethodGet {
// query == "?id=built-in/admin" // query == "?id=built-in/admin"
id := ctx.Input.Query("id") id := ctx.Input.Query("id")
if id == "" { if id != "" {
return "", "" return util.GetOwnerAndNameFromId(id)
} }
return util.GetOwnerAndNameFromId(id) owner := ctx.Input.Query("owner")
if owner != "" {
return owner, ""
}
return "", ""
} else { } else {
body := ctx.Input.RequestBody body := ctx.Input.RequestBody