Compare commits
No commits in common. "164f91eabde497512726919ad1eaab93c27deae3" and "0fdb9559f9e2b785c0e8243ac774713aca459b21" have entirely different histories.
164f91eabd
...
0fdb9559f9
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx-web",
|
"name": "traxxx-web",
|
||||||
"version": "0.26.2",
|
"version": "0.26.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "0.26.2",
|
"version": "0.26.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@brillout/json-serializer": "^0.5.8",
|
"@brillout/json-serializer": "^0.5.8",
|
||||||
"@dicebear/collection": "^7.0.5",
|
"@dicebear/collection": "^7.0.5",
|
||||||
|
|
|
@ -78,5 +78,5 @@
|
||||||
"postcss-custom-media": "^10.0.2",
|
"postcss-custom-media": "^10.0.2",
|
||||||
"postcss-nesting": "^12.0.2"
|
"postcss-nesting": "^12.0.2"
|
||||||
},
|
},
|
||||||
"version": "0.26.2"
|
"version": "0.26.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,6 @@ import initLogger from './logger.js';
|
||||||
|
|
||||||
const logger = initLogger();
|
const logger = initLogger();
|
||||||
|
|
||||||
const entityPrefixes = {
|
|
||||||
channel: '',
|
|
||||||
network: '_',
|
|
||||||
studio: '*',
|
|
||||||
info: '@',
|
|
||||||
};
|
|
||||||
|
|
||||||
export function curateEntity(entity, context) {
|
export function curateEntity(entity, context) {
|
||||||
if (!entity) {
|
if (!entity) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -143,7 +136,7 @@ export async function cacheEntityIds() {
|
||||||
const entities = await knex('entities').select('id', 'slug', 'type');
|
const entities = await knex('entities').select('id', 'slug', 'type');
|
||||||
|
|
||||||
await redis.del('traxxx:entities:id_by_slug');
|
await redis.del('traxxx:entities:id_by_slug');
|
||||||
await redis.hSet('traxxx:entities:id_by_slug', entities.map((entity) => [`${entityPrefixes[entity.type]}${entity.slug}`, entity.id]));
|
await redis.hSet('traxxx:entities:id_by_slug', entities.map((entity) => [entity.type === 'network' ? `_${entity.slug}` : entity.slug, entity.id]));
|
||||||
|
|
||||||
logger.info('Cached entity IDs by slug');
|
logger.info('Cached entity IDs by slug');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue