Skip to content

Commit

Permalink
fix(files): handling numbered type owner name & id
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
  • Loading branch information
sanskar-soni-9 committed Jun 10, 2024
1 parent 21a0009 commit cdd1a24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/files/src/services/Files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const resultToNode = function(node: FileStat): File | Folder {

const props = node.props as ResponseProps
const permissions = davParsePermissions(props?.permissions)
const owner = (props['owner-id'] || userId).toString()
const owner = String(props['owner-id'] || userId)

const source = generateRemoteUrl('dav' + rootPath + node.filename)
const id = props?.fileid < 0
Expand All @@ -49,7 +49,9 @@ export const resultToNode = function(node: FileStat): File | Folder {
attributes: {
...node,
...props,
hasPreview: props?.['has-preview'],
'owner-id': owner,
'owner-display-name': String(props['owner-display-name']),
hasPreview: !!props?.['has-preview'],
failed: props?.fileid < 0,
},
}
Expand Down

0 comments on commit cdd1a24

Please sign in to comment.