Skip to content

Commit e92c1e3

Browse files
authored
fix: Omit empty driveId in dir response JSON (#4694)
When making requests to the files API for directories (e.g to create a directory), we always return a `driveId` attribute in the response JSON even if the directory is not part of a shared drive while we omit it for files. We will now omit this attribute when empty for directories as well.
2 parents 72c676e + 60313f7 commit e92c1e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/files/paginated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type dir struct {
3838

3939
type dirJSON struct {
4040
*vfs.DirDoc
41-
DriveId string `json:"driveId"`
41+
DriveId string `json:"driveId,omitempty"`
4242
}
4343

4444
type file struct {

0 commit comments

Comments
 (0)