aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/Notes/models/Note.js4
-rw-r--r--apps/Notes/models/NoteList.js29
-rw-r--r--configs/appList.js2
-rw-r--r--configs/translations.js12
-rw-r--r--docker-compose.yml17
5 files changed, 29 insertions, 35 deletions
diff --git a/apps/Notes/models/Note.js b/apps/Notes/models/Note.js
index 0f4b3f9..c8cf854 100644
--- a/apps/Notes/models/Note.js
+++ b/apps/Notes/models/Note.js
@@ -11,7 +11,7 @@ noteSchema.statics.getNote = async (id) => {
const content = decrypt(note.content)
- return { ...note, content }
+ return { _id: note._id, content }
}
noteSchema.statics.updateNote = async (id, content) => {
@@ -19,7 +19,7 @@ noteSchema.statics.updateNote = async (id, content) => {
if (!note) throw new Error('Could not update note')
- return { ...note, content }
+ return { _id: note._id, content }
}
noteSchema.pre('save', async function (next) {
diff --git a/apps/Notes/models/NoteList.js b/apps/Notes/models/NoteList.js
index 0af648a..7bad163 100644
--- a/apps/Notes/models/NoteList.js
+++ b/apps/Notes/models/NoteList.js
@@ -49,16 +49,25 @@ noteListSchema.statics.removeNote = async (_id, id) => {
}
noteListSchema.statics.updateList = async (_id, noteId, title) => {
- const noteList = await NoteList.findOneAndUpdate(
- { _id, 'notes.noteId': noteId },
- {
- $set: {
- 'notes.$.title': encrypt(title || 'No title'),
- 'notes.$.updated_at': Date.now()
- }
- },
- { new: true }
- ).lean()
+ const noteList = title
+ ? await NoteList.findOneAndUpdate(
+ { _id, 'notes.noteId': noteId },
+ {
+ $set: {
+ 'notes.$.title': encrypt(title || 'No title'),
+ 'notes.$.updated_at': Date.now()
+ }
+ },
+ { new: true }
+ ).lean() : await NoteList.findOneAndUpdate(
+ { _id, 'notes.noteId': noteId },
+ {
+ $set: {
+ 'notes.$.updated_at': Date.now()
+ }
+ },
+ { new: true }
+ ).lean()
return decryptTitles(noteList)
}
diff --git a/configs/appList.js b/configs/appList.js
index 83535a3..7bfec3e 100644
--- a/configs/appList.js
+++ b/configs/appList.js
@@ -1,7 +1,7 @@
import { Calculator, Notes, Player, Settings, Youtube } from 'apps'
const appList = {
- Calculator: { component: Calculator, icon: true, buttons: ['min', 'close'], height: '40em', width: '30em' },
+ Calculator: { component: Calculator, icon: true, buttons: ['min', 'close'], height: '30em', width: '20em' },
Notes: { component: Notes, icon: true, buttons: ['min', 'max', 'close'], height: '48em', width: '64em' },
Player: { component: Player, icon: true, buttons: ['min', 'max', 'close'], height: '48em', width: '64em' },
Settings: { component: Settings, icon: false, buttons: ['min'], height: '23em', width: '16em' },
diff --git a/configs/translations.js b/configs/translations.js
index 79fcf7d..1b8ed40 100644
--- a/configs/translations.js
+++ b/configs/translations.js
@@ -38,7 +38,7 @@ const translations = {
Player: 'Player',
Settings: 'Settings',
Youtube: 'Youtube',
- mail_ver_subject: 'Verification of your new My Apps account',
+ mail_ver_subject: 'Verification of your new apps.pruss.it account',
mail_ver_t1: 'Thank you for creating an account in My Apps.',
mail_ver_t2: 'We are sending you the verification code:',
mail_ver_t3: 'To finish verification log in and paste this code.',
@@ -126,7 +126,7 @@ const translations = {
Player: 'Odtwarzacz',
Settings: 'Ustawienia',
Youtube: 'Youtube',
- mail_ver_subject: 'Weryfikacja Twojego nowego konta w aplikacji My Apps.',
+ mail_ver_subject: 'Weryfikacja Twojego nowego konta w apps.pruss.it.',
mail_ver_t1: 'Dziękujemy za założenie konta w My Apps',
mail_ver_t2: 'Przesyłamy Ci kod weryfikacyjny:',
mail_ver_t3: 'W celu zakończenia weryfikacji zaloguj się i podaj ten kod.',
@@ -209,12 +209,12 @@ const translations = {
created: 'Creado',
modified: 'Modificado',
open_apps: 'Aplicaciones abiertas:',
- Calculator: '????????????????????????????????????????????????????/',
+ Calculator: 'Calculadora',
Notes: 'Notas',
Player: 'Jugador',
Settings: 'Ajustes',
Youtube: 'Youtube',
- mail_ver_subject: 'Verificación de su nueva cuenta en la aplicación My Apps.',
+ mail_ver_subject: 'Verificación de su nueva cuenta en apps.pruss.it.',
mail_ver_t1: 'Gracias por crear una cuenta con Mis aplicaciones',
mail_ver_t2: 'Te enviamos un código de verificación: ',
mail_ver_t3: 'Para completar la verificación, inicie sesión e ingrese este código.',
@@ -297,12 +297,12 @@ const translations = {
created: 'Erstellt',
modified: 'Geändert',
open_apps: 'Anwendungen öffnen:',
- Calculator: '????????????????????????????????????????????????????/',
+ Calculator: 'Rechner',
Notes: 'Anmerkungen',
Player: 'Spieler',
Settings: 'Einstellungen',
Youtube: 'Youtube',
- mail_ver_subject: 'Bestätigen Ihres neuen Kontos in der Anwendung „Meine Apps“.',
+ mail_ver_subject: 'Bestätigen Ihres neuen Kontos in der apps.pruss.it.',
mail_ver_t1: 'Vielen Dank, dass Sie ein Konto bei My Apps erstellt haben',
mail_ver_t2: 'Wir senden Ihnen einen Bestätigungscode: ',
mail_ver_t3: 'Um die Verifizierung abzuschließen, loggen Sie sich ein und geben Sie diesen Code ein.',
diff --git a/docker-compose.yml b/docker-compose.yml
index e085893..993e573 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,27 +9,12 @@ services:
- VIRTUAL_HOST=apps.pruss.it,www.apps.pruss.it
- LETSENCRYPT_HOST=apps.pruss.it,www.apps.pruss.it
- LETSENCRYPT_EMAIL=mail@pruss.it
- - MONGODB_CONNSTRING=mongodb://apps:${MONGODB_PASS}@mongodb
+ - MONGODB_CONNSTRING=mongodb://pruss:${MONGODB_PASS}@mongodb
- MYAPPS_SECRET_COOKIE_PASSWORD=${MYAPPS_SECRET_COOKIE_PASSWORD}
- MYAPPS_NOTES_KEY=${MYAPPS_NOTES_KEY}
- MYAPPS_MAIL_SMTP_SERVER=${MYAPPS_MAIL_SMTP_SERVER}
- MYAPPS_MAIL_ADDRESS=${MYAPPS_MAIL_ADDRESS}
- MYAPPS_MAIL_PASSWORD=${MYAPPS_MAIL_PASSWORD}
- depends_on:
- - "mongodb"
- restart: always
-
- mongodb:
- image: mongo:5.0
- container_name: apps_db
- user: ${MY_UID}:${MY_GID}
- ports:
- - "27017:27017"
- environment:
- - MONGO_INITDB_ROOT_USERNAME=apps
- - MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASS}
- volumes:
- - ./db:/data/db
restart: always
networks: