- const newUrl = body.id
- if (newUrl !== url) {
- if (checkUrlsSameHost(newUrl, url) !== true) {
- throw new Error(`New url ${newUrl} has not the same host than old url ${url}`)
+ const newUrl = body.id
+ if (newUrl !== url) {
+ if (checkUrlsSameHost(newUrl, url) !== true) {
+ throw new Error(`New url ${newUrl} has not the same host than old url ${url}`)
+ }
+
+ logger.info('Updating remote AP object %s.', url, lTags(url))
+ const data = await updater(url, newUrl)
+
+ return { status: 'updated', data }