mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 19:49:56 -06:00
[server] change structure of ls response
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
||||
)
|
||||
|
||||
type ResourceLsResponse struct {
|
||||
Metadata fs.Resource `json:"metadata"`
|
||||
Children []serve.Resource `json:"children,omitempty"`
|
||||
fs.Resource
|
||||
InheritedPermissions string `json:"inherited,omitempty"`
|
||||
Children []serve.Resource `json:"children,omitempty"`
|
||||
}
|
||||
|
||||
func handleLsRequest(c *gin.Context) {
|
||||
@@ -31,7 +31,7 @@ func handleLsRequest(c *gin.Context) {
|
||||
|
||||
func LsResponseFromResource(f fs.FileSystem, r fs.Resource) ResourceLsResponse {
|
||||
response := ResourceLsResponse{
|
||||
Metadata: r,
|
||||
Resource: r,
|
||||
InheritedPermissions: r.InheritedPermissions,
|
||||
}
|
||||
if r.Dir {
|
||||
|
||||
Reference in New Issue
Block a user