mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 16:03:02 +00:00
Refactor
This commit is contained in:
parent
d2e7546de7
commit
53db52bb40
1 changed files with 13 additions and 11 deletions
|
@ -56,18 +56,20 @@ export default (
|
||||||
|
|
||||||
_target.url = `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
|
_target.url = `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
|
||||||
|
|
||||||
if (opts.detail && _target.folder_id) {
|
if (opts.detail) {
|
||||||
// Populate folder
|
if (_target.folder_id) {
|
||||||
_target.folder = await serializeDriveFolder(_target.folder_id, {
|
// Populate folder
|
||||||
detail: true
|
_target.folder = await serializeDriveFolder(_target.folder_id, {
|
||||||
});
|
detail: true
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (opts.detail && _target.tags) {
|
if (_target.tags) {
|
||||||
// Populate tags
|
// Populate tags
|
||||||
_target.tags = await _target.tags.map(async (tag: any) =>
|
_target.tags = await _target.tags.map(async (tag: any) =>
|
||||||
await serializeDriveTag(tag)
|
await serializeDriveTag(tag)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(_target);
|
resolve(_target);
|
||||||
|
|
Loading…
Reference in a new issue