Do not update applink icon if it is not set in update
This commit is contained in:
@@ -185,6 +185,13 @@ async function update(applinkId, applink) {
|
||||
if (applink.icon) {
|
||||
if (!validator.isBase64(applink.icon)) throw new BoxError(BoxError.BAD_FIELD, 'icon is not base64');
|
||||
applink.icon = Buffer.from(applink.icon, 'base64');
|
||||
} else if (applink.icon === '') {
|
||||
// empty string means we autodetect in detectMetaInfo
|
||||
applink.icon = '';
|
||||
} else {
|
||||
// nothing changed reuse old
|
||||
const result = await get(applinkId);
|
||||
applink.icon = result.icon;
|
||||
}
|
||||
|
||||
await detectMetaInfo(applink);
|
||||
|
||||
Reference in New Issue
Block a user