From a22023174d4b9c7afc24530331daf6c7c85fb3fc Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 18:33:12 +0200 Subject: [PATCH 01/13] feat: Show Categories Filter when Categories are Active --- webapp/components/FilterMenu/FilterMenu.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapp/components/FilterMenu/FilterMenu.vue b/webapp/components/FilterMenu/FilterMenu.vue index 9e211ccf9..84c7c1f67 100644 --- a/webapp/components/FilterMenu/FilterMenu.vue +++ b/webapp/components/FilterMenu/FilterMenu.vue @@ -14,6 +14,7 @@

{{ $t('filter-menu.filter-by') }}

+

{{ $t('filter-menu.order-by') }}

@@ -28,17 +29,24 @@ import Dropdown from '~/components/Dropdown' import { mapGetters } from 'vuex' import FollowingFilter from './FollowingFilter' import OrderByFilter from './OrderByFilter' +import CategoriesFilter from './CategoriesFilter' export default { components: { Dropdown, FollowingFilter, + CategoriesFilter, OrderByFilter, }, props: { placement: { type: String }, offset: { type: [String, Number] }, }, + data() { + return { + categoriesActive: this.$env.CATEGORIES_ACTIVE, + } + }, computed: { ...mapGetters({ filterActive: 'posts/isActive', From eddaa96d367e2be279eb5dfcbf3b0560b35357cb Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 18:52:42 +0200 Subject: [PATCH 02/13] add movement icon --- webapp/assets/_new/icons/svgs/movement.svg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 webapp/assets/_new/icons/svgs/movement.svg diff --git a/webapp/assets/_new/icons/svgs/movement.svg b/webapp/assets/_new/icons/svgs/movement.svg new file mode 100644 index 000000000..ac5cd9cc0 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/movement.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + From c1f1408f6c7670f9305643b7440e5c9af0b17beb Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 19:17:50 +0200 Subject: [PATCH 03/13] add yunite categories --- backend/src/constants/categories.js | 98 +++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 backend/src/constants/categories.js diff --git a/backend/src/constants/categories.js b/backend/src/constants/categories.js new file mode 100644 index 000000000..d38f64b1a --- /dev/null +++ b/backend/src/constants/categories.js @@ -0,0 +1,98 @@ +export const categories = [ + { + icon: 'users', + name: 'networking', + description: 'Kooperation, Aktionsbündnisse, Solidarität, Hilfe', + }, + { + icon: 'home', + name: 'home', + description: 'Bauen, Lebensgemeinschaften, Tiny Houses, Gemüsegarten', + }, + { + icon: 'lightbulb', + name: 'energy', + description: 'Öl, Gas, Kohle, Wind, Wasserkraft, Biogas, Atomenergie, ...', + }, + { + icon: 'smile', + name: 'psyche', + description: 'Seele, Gefühle, Glück', + }, + { + icon: 'movement', + name: 'body-and-excercise', + description: 'Sport, Yoga, Massage, Tanzen, Entspannung', + }, + { + icon: 'balance-scale', + name: 'law', + description: 'Menschenrechte, Gesetze, Verordnungen', + }, + { + icon: 'money', + name: 'finance', + description: 'Geld, Finanzsystem, Alternativwährungen, ...', + }, + { + icon: 'child', + name: 'children', + description: 'Familie, Pädagogik, Schule, Prägung', + }, + { + icon: 'suitcase', + name: 'mobility', + description: 'Reise, Verkehr, Elektromobilität', + }, + { + icon: 'shopping-cart', + name: 'economy', + description: 'Handel, Konsum, Marketing, Lebensmittel, Lieferketten, ...', + }, + { + icon: 'angellist', + name: 'peace', + description: 'Krieg, Militär, soziale Verteidigung, Waffen, Cyberattacken', + }, + { + icon: 'university', + name: 'politics', + description: 'Demokratie, Mitbestimmung, Wahlen, Korruption, Parteien', + }, + { + icon: 'tree', + name: 'nature', + description: 'Tiere, Pflanzen, Landwirtschaft, Ökologie, Artenvielfalt', + }, + { + icon: 'graduation-cap', + name: 'science', + description: 'Bildung, Hochschule, Publikationen, ...', + }, + { + icon: 'medkit', + name: 'health', + description: 'Medizin, Ernährung, WHO, Impfungen, Schadstoffe, ...', + }, + { + icon: 'desktop', + name: 'IT-and-media', + description: + 'Nachrichten, Manipulation, Datenschutz, Überwachung, Datenkraken, AI, Software, Apps', + }, + { + icon: 'heart-o', + name: 'spirituality', + description: 'Religion, Werte, Ethik', + }, + { + icon: 'music', + name: 'culture', + description: 'Kunst, Theater, Musik, Fotografie, Film', + }, + { + icon: 'ellipsis-h', + name: 'miscellaneous', + description: '', + }, +] From 6425e5d172fa06020f46d1c3a9d1fcf5266c9cf2 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 19:44:20 +0200 Subject: [PATCH 04/13] seed categories on db:migrate init --- backend/src/db/migrate/store.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index 377caf0b0..0361e874b 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -1,6 +1,8 @@ import { getDriver, getNeode } from '../../db/neo4j' import { hashSync } from 'bcryptjs' import { v4 as uuid } from 'uuid' +import { categories } from '../../constants/categories' +import CONFIG from '../../config' const defaultAdmin = { email: 'admin@example.org', @@ -10,6 +12,27 @@ const defaultAdmin = { slug: 'admin', } +const createCategories = async (session) => { + const createCategoriesTxResultPromise = session.writeTransaction(async (txc) => { + categories.forEach(({ icon, name }, index) => { + const id = `cat${index + 1}` + txc.run( + `MERGE (c:Category { + icon: "${icon}", + slug: "${name}", + id: "${id}", + createdAt: toString(datetime()) + })`, + ) + }) + }) + try { + await createCategoriesTxResultPromise + } catch (error) { + console.log(`Error creating categories: ${error}`) // eslint-disable-line no-console + } +} + const createDefaultAdminUser = async (session) => { const readTxResultPromise = session.readTransaction(async (txc) => { const result = await txc.run('MATCH (user:User) RETURN count(user) AS userCount') @@ -58,6 +81,7 @@ class Store { const { driver } = neode const session = driver.session() await createDefaultAdminUser(session) + if (CONFIG.CATEGORIES_ACTIVE) await createCategories(session) const writeTxResultPromise = session.writeTransaction(async (txc) => { await txc.run('CALL apoc.schema.assert({},{},true)') // drop all indices return Promise.all( From 5b7bdc02913e7b3aad12dced5725441010e34045 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 19:56:35 +0200 Subject: [PATCH 05/13] seed Yunite categories --- backend/src/db/factories.js | 1 - backend/src/db/seed.js | 106 +++------------------------------ backend/src/models/Category.js | 4 +- 3 files changed, 10 insertions(+), 101 deletions(-) diff --git a/backend/src/db/factories.js b/backend/src/db/factories.js index 3e164d51b..f46ac10ee 100644 --- a/backend/src/db/factories.js +++ b/backend/src/db/factories.js @@ -35,7 +35,6 @@ export const cleanDatabase = async (options = {}) => { Factory.define('category') .attr('id', uuid) .attr('icon', 'globe') - .attr('name', 'Global Peace & Nonviolence') .after((buildObject, options) => { return neode.create('Category', buildObject) }) diff --git a/backend/src/db/seed.js b/backend/src/db/seed.js index 46c5870e0..eb79d5aa2 100644 --- a/backend/src/db/seed.js +++ b/backend/src/db/seed.js @@ -6,6 +6,7 @@ import faker from '@faker-js/faker' import Factory from '../db/factories' import { getNeode, getDriver } from '../db/neo4j' import { gql } from '../helpers/jest' +import { categories } from '../constants/categories' if (CONFIG.PRODUCTION && !CONFIG.PRODUCTION_DB_CLEAN_ALLOW) { throw new Error(`You cannot seed the database in a non-staging and real production environment!`) @@ -267,104 +268,15 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] dagobert.relateTo(louie, 'blocked'), ]) - await Promise.all([ - Factory.build('category', { - id: 'cat1', - name: 'Just For Fun', - slug: 'just-for-fun', - icon: 'smile', + await Promise.all( + categories.map(({ icon, name }, index) => { + Factory.build('category', { + id: `cat${index + 1}`, + slug: name, + icon, + }) }), - Factory.build('category', { - id: 'cat2', - name: 'Happiness & Values', - slug: 'happiness-values', - icon: 'heart-o', - }), - Factory.build('category', { - id: 'cat3', - name: 'Health & Wellbeing', - slug: 'health-wellbeing', - icon: 'medkit', - }), - Factory.build('category', { - id: 'cat4', - name: 'Environment & Nature', - slug: 'environment-nature', - icon: 'tree', - }), - Factory.build('category', { - id: 'cat5', - name: 'Animal Protection', - slug: 'animal-protection', - icon: 'paw', - }), - Factory.build('category', { - id: 'cat6', - name: 'Human Rights & Justice', - slug: 'human-rights-justice', - icon: 'balance-scale', - }), - Factory.build('category', { - id: 'cat7', - name: 'Education & Sciences', - slug: 'education-sciences', - icon: 'graduation-cap', - }), - Factory.build('category', { - id: 'cat8', - name: 'Cooperation & Development', - slug: 'cooperation-development', - icon: 'users', - }), - Factory.build('category', { - id: 'cat9', - name: 'Democracy & Politics', - slug: 'democracy-politics', - icon: 'university', - }), - Factory.build('category', { - id: 'cat10', - name: 'Economy & Finances', - slug: 'economy-finances', - icon: 'money', - }), - Factory.build('category', { - id: 'cat11', - name: 'Energy & Technology', - slug: 'energy-technology', - icon: 'flash', - }), - Factory.build('category', { - id: 'cat12', - name: 'IT, Internet & Data Privacy', - slug: 'it-internet-data-privacy', - icon: 'mouse-pointer', - }), - Factory.build('category', { - id: 'cat13', - name: 'Art, Culture & Sport', - slug: 'art-culture-sport', - icon: 'paint-brush', - }), - Factory.build('category', { - id: 'cat14', - name: 'Freedom of Speech', - slug: 'freedom-of-speech', - icon: 'bullhorn', - }), - Factory.build('category', { - id: 'cat15', - name: 'Consumption & Sustainability', - slug: 'consumption-sustainability', - icon: 'shopping-cart', - }), - Factory.build('category', { - id: 'cat16', - name: 'Global Peace & Nonviolence', - slug: 'global-peace-nonviolence', - icon: 'angellist', - }), - ]) + ) const [environment, nature, democracy, freedom] = await Promise.all([ Factory.build('tag', { diff --git a/backend/src/models/Category.js b/backend/src/models/Category.js index ea617adc8..8d87ac0e2 100644 --- a/backend/src/models/Category.js +++ b/backend/src/models/Category.js @@ -2,15 +2,13 @@ import { v4 as uuid } from 'uuid' export default { id: { type: 'string', primary: true, default: uuid }, - name: { type: 'string', required: true, default: false }, slug: { type: 'string', unique: 'true' }, icon: { type: 'string', required: true, default: false }, createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, updatedAt: { type: 'string', isoDate: true, - required: true, - default: () => new Date().toISOString(), + required: false, }, post: { type: 'relationship', From 25c8fe275f61c886f7634e68565fd7aa87875343 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 20:11:21 +0200 Subject: [PATCH 06/13] add locales for yunite categories --- backend/src/constants/categories.js | 2 +- webapp/locales/de.json | 35 ++++++++++++++++------------- webapp/locales/en.json | 35 ++++++++++++++++------------- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/backend/src/constants/categories.js b/backend/src/constants/categories.js index d38f64b1a..146131453 100644 --- a/backend/src/constants/categories.js +++ b/backend/src/constants/categories.js @@ -76,7 +76,7 @@ export const categories = [ }, { icon: 'desktop', - name: 'IT-and-media', + name: 'it-and-media', description: 'Nachrichten, Manipulation, Datenschutz, Überwachung, Datenkraken, AI, Software, Apps', }, diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 297daa511..dee8d086a 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -218,22 +218,25 @@ }, "category": { "name": { - "animal-protection": "Schutz der Tiere", - "art-culture-sport": "Kunst, Kultur & Sport", - "consumption-sustainability": "Verbrauch & Nachhaltigkeit", - "cooperation-development": "Zusammenarbeit & Entwicklung", - "democracy-politics": "Demokratie & Politik", - "economy-finances": "Wirtschaft & Finanzen", - "education-sciences": "Bildung & Wissenschaft", - "energy-technology": "Energie & Technologie", - "environment-nature": "Umwelt & Natur", - "freedom-of-speech": "Redefreiheit", - "global-peace-nonviolence": "Globaler Frieden & Gewaltlosigkeit", - "happiness-values": "Glück & Werte", - "health-wellbeing": "Gesundheit & Wohlbefinden", - "human-rights-justice": "Menschenrechte & Gerechtigkeit", - "it-internet-data-privacy": "IT, Internet & Datenschutz", - "just-for-fun": "Nur zum Spaß" + "body-and-excercise": "Körper & Bewegung", + "children": "Kinder", + "culture": "Kultur", + "economy": "Wirtschaft", + "energy": "Energie", + "finance": "Finanzen", + "health": "Gesundheit", + "home": "Wohnen", + "it-and-media": "IT & Medien", + "law": "Recht", + "miscellaneous": "Sonstiges", + "mobility": "Mobilität", + "nature": "Natur", + "networking": "Vernetzung", + "peace": "Frieden", + "politics": "Politik", + "psyche": "Psyche", + "science": "Wissenschaft", + "spirituality": "Spiritualität" } }, "emotions-label": { diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 8499b0290..d6172c257 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -218,22 +218,25 @@ }, "category": { "name": { - "animal-protection": "Animal Protection", - "art-culture-sport": "Art, Culture, & Sport", - "consumption-sustainability": "Consumption & Sustainability", - "cooperation-development": "Cooperation & Development", - "democracy-politics": "Democracy & Politics", - "economy-finances": "Economy & Finances", - "education-sciences": "Education & Sciences", - "energy-technology": "Energy & Technology", - "environment-nature": "Environment & Nature", - "freedom-of-speech": "Freedom of Speech", - "global-peace-nonviolence": "Global Peace & Nonviolence", - "happiness-values": "Happiness & Values", - "health-wellbeing": "Health & Wellbeing", - "human-rights-justice": "Human Rights & Justice", - "it-internet-data-privacy": "IT, Internet & Data Privacy", - "just-for-fun": "Just for Fun" + "body-and-excercise": "Body & Excercise", + "children": "Children", + "culture": "Culture", + "economy": "Economy", + "energy": "Energy", + "finance": "Finance", + "health": "Health", + "home": "Home", + "it-and-media": "IT & Media", + "law": "Law", + "miscellaneous": "Miscellaneous", + "mobility": "Mobility", + "nature": "Nature", + "networking": "Networking", + "peace": "Peace", + "politics": "Politics", + "psyche": "Psyche", + "science": "Science", + "spirituality": "Spirituality" } }, "emotions-label": { From ad4497786ce9b26171846a9fa9881dc67aa9f371 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 20:29:04 +0200 Subject: [PATCH 07/13] add missing items for categories --- webapp/assets/_new/icons/svgs/child.svg | 5 +++++ webapp/assets/_new/icons/svgs/desktop.svg | 5 +++++ webapp/assets/_new/icons/svgs/ellipsis-h.svg | 5 +++++ webapp/assets/_new/icons/svgs/home.svg | 5 +++++ webapp/assets/_new/icons/svgs/lightbulb.svg | 5 +++++ webapp/assets/_new/icons/svgs/music.svg | 5 +++++ webapp/assets/_new/icons/svgs/suitcase.svg | 5 +++++ 7 files changed, 35 insertions(+) create mode 100644 webapp/assets/_new/icons/svgs/child.svg create mode 100644 webapp/assets/_new/icons/svgs/desktop.svg create mode 100644 webapp/assets/_new/icons/svgs/ellipsis-h.svg create mode 100644 webapp/assets/_new/icons/svgs/home.svg create mode 100644 webapp/assets/_new/icons/svgs/lightbulb.svg create mode 100644 webapp/assets/_new/icons/svgs/music.svg create mode 100644 webapp/assets/_new/icons/svgs/suitcase.svg diff --git a/webapp/assets/_new/icons/svgs/child.svg b/webapp/assets/_new/icons/svgs/child.svg new file mode 100644 index 000000000..fcb5651f0 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/child.svg @@ -0,0 +1,5 @@ + + +child + + diff --git a/webapp/assets/_new/icons/svgs/desktop.svg b/webapp/assets/_new/icons/svgs/desktop.svg new file mode 100644 index 000000000..ba1ef8431 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/desktop.svg @@ -0,0 +1,5 @@ + + +desktop + + diff --git a/webapp/assets/_new/icons/svgs/ellipsis-h.svg b/webapp/assets/_new/icons/svgs/ellipsis-h.svg new file mode 100644 index 000000000..eb7deeab0 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/ellipsis-h.svg @@ -0,0 +1,5 @@ + + +ellipsis-h + + diff --git a/webapp/assets/_new/icons/svgs/home.svg b/webapp/assets/_new/icons/svgs/home.svg new file mode 100644 index 000000000..b1a13b06f --- /dev/null +++ b/webapp/assets/_new/icons/svgs/home.svg @@ -0,0 +1,5 @@ + + +home + + diff --git a/webapp/assets/_new/icons/svgs/lightbulb.svg b/webapp/assets/_new/icons/svgs/lightbulb.svg new file mode 100644 index 000000000..1c19c81b1 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/lightbulb.svg @@ -0,0 +1,5 @@ + + +lightbulb-o + + diff --git a/webapp/assets/_new/icons/svgs/music.svg b/webapp/assets/_new/icons/svgs/music.svg new file mode 100644 index 000000000..b84b87800 --- /dev/null +++ b/webapp/assets/_new/icons/svgs/music.svg @@ -0,0 +1,5 @@ + + +music + + diff --git a/webapp/assets/_new/icons/svgs/suitcase.svg b/webapp/assets/_new/icons/svgs/suitcase.svg new file mode 100644 index 000000000..ceca5cbad --- /dev/null +++ b/webapp/assets/_new/icons/svgs/suitcase.svg @@ -0,0 +1,5 @@ + + +suitcase + + From d948067f44a1d6caf492dde222d97564d824940c Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 22 Aug 2022 20:47:37 +0200 Subject: [PATCH 08/13] add category name again to seed and init to avoid conflicts with graphql model --- backend/src/db/factories.js | 1 + backend/src/db/migrate/store.js | 1 + backend/src/db/seed.js | 1 + backend/src/models/Category.js | 1 + backend/src/schema/resolvers/posts.js | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/db/factories.js b/backend/src/db/factories.js index f46ac10ee..3e164d51b 100644 --- a/backend/src/db/factories.js +++ b/backend/src/db/factories.js @@ -35,6 +35,7 @@ export const cleanDatabase = async (options = {}) => { Factory.define('category') .attr('id', uuid) .attr('icon', 'globe') + .attr('name', 'Global Peace & Nonviolence') .after((buildObject, options) => { return neode.create('Category', buildObject) }) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index 0361e874b..61d591cb7 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -20,6 +20,7 @@ const createCategories = async (session) => { `MERGE (c:Category { icon: "${icon}", slug: "${name}", + name: "${name}", id: "${id}", createdAt: toString(datetime()) })`, diff --git a/backend/src/db/seed.js b/backend/src/db/seed.js index eb79d5aa2..482517e69 100644 --- a/backend/src/db/seed.js +++ b/backend/src/db/seed.js @@ -273,6 +273,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] Factory.build('category', { id: `cat${index + 1}`, slug: name, + name, icon, }) }), diff --git a/backend/src/models/Category.js b/backend/src/models/Category.js index 8d87ac0e2..9a3f47fd0 100644 --- a/backend/src/models/Category.js +++ b/backend/src/models/Category.js @@ -2,6 +2,7 @@ import { v4 as uuid } from 'uuid' export default { id: { type: 'string', primary: true, default: uuid }, + name: { type: 'string', required: true, default: false }, slug: { type: 'string', unique: 'true' }, icon: { type: 'string', required: true, default: false }, createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() }, diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index b09bb3edd..d9a04732c 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -358,7 +358,7 @@ export default { undefinedToNull: ['activityId', 'objectId', 'language', 'pinnedAt', 'pinned'], hasMany: { tags: '-[:TAGGED]->(related:Tag)', - // categories: '-[:CATEGORIZED]->(related:Category)', + categories: '-[:CATEGORIZED]->(related:Category)', comments: '<-[:COMMENTS]-(related:Comment)', shoutedBy: '<-[:SHOUTED]-(related:User)', emotions: '<-[related:EMOTED]', From 407f4f8d2d27605c41fb529c0f514e9fea5e7bd8 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 25 Aug 2022 13:29:08 +0200 Subject: [PATCH 09/13] fix test (mock .CATEGORIES_ACTIVE) --- webapp/components/FilterMenu/FilterMenu.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webapp/components/FilterMenu/FilterMenu.spec.js b/webapp/components/FilterMenu/FilterMenu.spec.js index 9e7ebfec0..6e9741e79 100644 --- a/webapp/components/FilterMenu/FilterMenu.spec.js +++ b/webapp/components/FilterMenu/FilterMenu.spec.js @@ -8,6 +8,9 @@ let wrapper describe('FilterMenu.vue', () => { const mocks = { $t: jest.fn((string) => string), + $env: { + CATEGORIES_ACTIVE: true, + }, } const getters = { From f2aba3e12e284e8a0bc78ac0afe52aed01420711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 25 Aug 2022 18:03:21 +0200 Subject: [PATCH 10/13] Put exclamation mark behind console log text of successfully created default admin user for consistency --- backend/src/db/migrate/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index 61d591cb7..3a1b321e4 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -69,7 +69,7 @@ const createDefaultAdminUser = async (session) => { }) try { await createAdminTxResultPromise - console.log('Successfully created default admin user') // eslint-disable-line no-console + console.log('Successfully created default admin user!') // eslint-disable-line no-console } catch (error) { console.log(error) // eslint-disable-line no-console } From 3e6cabaa1c4e8e7cccf11634d4c893f822767ca1 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 30 Aug 2022 10:13:56 +0200 Subject: [PATCH 11/13] Update backend/src/db/migrate/store.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Wolfgang Huß --- backend/src/db/migrate/store.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index 3a1b321e4..d6fd25bd8 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -29,6 +29,7 @@ const createCategories = async (session) => { }) try { await createCategoriesTxResultPromise + console.log('Successfully created categories!') // eslint-disable-line no-console } catch (error) { console.log(`Error creating categories: ${error}`) // eslint-disable-line no-console } From 0d1da0d83d2bb5b183c203e2db69f58978e1cd1d Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 30 Aug 2022 10:14:39 +0200 Subject: [PATCH 12/13] Update backend/src/db/migrate/store.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Wolfgang Huß --- backend/src/db/migrate/store.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index d6fd25bd8..98014f05c 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -30,6 +30,7 @@ const createCategories = async (session) => { try { await createCategoriesTxResultPromise console.log('Successfully created categories!') // eslint-disable-line no-console + console.log('Successfully created categories!') // eslint-disable-line no-console } catch (error) { console.log(`Error creating categories: ${error}`) // eslint-disable-line no-console } From c61e983102042b7a6fd568767ee81bf555425f70 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 30 Aug 2022 10:21:15 +0200 Subject: [PATCH 13/13] remove double console log --- backend/src/db/migrate/store.js | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/src/db/migrate/store.js b/backend/src/db/migrate/store.js index 98014f05c..d6fd25bd8 100644 --- a/backend/src/db/migrate/store.js +++ b/backend/src/db/migrate/store.js @@ -30,7 +30,6 @@ const createCategories = async (session) => { try { await createCategoriesTxResultPromise console.log('Successfully created categories!') // eslint-disable-line no-console - console.log('Successfully created categories!') // eslint-disable-line no-console } catch (error) { console.log(`Error creating categories: ${error}`) // eslint-disable-line no-console }