Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 91746c73e1 1.151.1 2020-12-30 03:39:47 +01:00
DebaucheryLibrarian f0a90db912 Only allow actor flush by name for non-entity specific actors. 2020-12-30 03:39:40 +01:00
3 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.151.0", "version": "1.151.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.151.0", "version": "1.151.1",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@ -960,7 +960,11 @@ async function flushProfiles(actorIdsOrNames) {
async function flushActors(actorIdsOrNames) { async function flushActors(actorIdsOrNames) {
const actors = await knex('actors') const actors = await knex('actors')
.whereIn('id', actorIdsOrNames.filter(idOrName => typeof idOrName === 'number')) .whereIn('id', actorIdsOrNames.filter(idOrName => typeof idOrName === 'number'))
.orWhereIn('name', actorIdsOrNames.filter(idOrName => typeof idOrName === 'string')); .orWhere((builder) => {
builder
.whereIn('name', actorIdsOrNames.filter(idOrName => typeof idOrName === 'string'))
.whereNull('entity_id');
});
const actorIds = actors.map(actor => actor.id); const actorIds = actors.map(actor => actor.id);