Also search for url field when looking for existing note in database

This commit is contained in:
Laura Hausmann 2023-06-27 19:19:15 +02:00 committed by Laura Hausmann
parent f3dbe59faa
commit 5c9d8b21a5

View file

@ -80,8 +80,15 @@ export default class DbResolver {
id: parsed.id, id: parsed.id,
}); });
} else { } else {
return await Notes.findOneBy({ return await Notes.findOne({
uri: parsed.uri, where: [
{
uri: parsed.uri,
},
{
url: parsed.uri,
},
],
}); });
} }
} }