diff --git a/apps/juxtaposition-ui/src/translations/fr.json b/apps/juxtaposition-ui/src/translations/fr.json index 4926ea95..6a9264cb 100644 --- a/apps/juxtaposition-ui/src/translations/fr.json +++ b/apps/juxtaposition-ui/src/translations/fr.json @@ -47,7 +47,7 @@ "followers": "Abonnés", "follow_user": "Suivre", "following_user": "Suivi(e)", - "befriend": "Demander en ami", + "befriend": "Demander en ami(e)", "pending": "En attente", "unfriend": "Retirer des amis", "no_friends": "Aucun ami", diff --git a/apps/juxtaposition-ui/src/translations/hu.json b/apps/juxtaposition-ui/src/translations/hu.json index 86942f2b..1038204e 100644 --- a/apps/juxtaposition-ui/src/translations/hu.json +++ b/apps/juxtaposition-ui/src/translations/hu.json @@ -73,7 +73,7 @@ "text_hint": "Koppints ide egy új bejegyzés létrehozásához." }, "messages": { - "coming_soon": "Az Üzenetek még nincs kész. Nézz vissza később!" + "coming_soon": "Nincs üzenet" }, "setup": { "welcome": "Köszöntünk Juxtaposition-ben!", diff --git a/apps/juxtaposition-ui/src/translations/id.json b/apps/juxtaposition-ui/src/translations/id.json index 155b01ca..cc4e8889 100644 --- a/apps/juxtaposition-ui/src/translations/id.json +++ b/apps/juxtaposition-ui/src/translations/id.json @@ -121,6 +121,6 @@ "swearing": "Postingan tidak boleh mengandung bahasa eksplisit." }, "messages": { - "coming_soon": "Pesan-Pesan belum siap sekarang. Segara periksa kembali!" + "coming_soon": "Tidak ada Pesanan" } } diff --git a/apps/miiverse-api/src/models/post.ts b/apps/miiverse-api/src/models/post.ts index 9107011c..8f192997 100644 --- a/apps/miiverse-api/src/models/post.ts +++ b/apps/miiverse-api/src/models/post.ts @@ -12,10 +12,13 @@ import type { PostData, PostPainting, PostScreenshot, PostTopicTag } from '@/typ * If you add default: or required:, please also update IPost and IPostInput! */ const PostSchema = new Schema({ - id: { type: String, required: true }, + id: { type: String }, // generated in save hook title_id: { type: String }, screen_name: { type: String, required: true }, - body: { type: String, required: true }, + body: { + type: String, + default: '' + }, app_data: { type: String }, painting: { type: String }, diff --git a/apps/miiverse-api/src/server.ts b/apps/miiverse-api/src/server.ts index d2637c51..44afc421 100644 --- a/apps/miiverse-api/src/server.ts +++ b/apps/miiverse-api/src/server.ts @@ -65,7 +65,12 @@ app.use((_request: express.Request, response: express.Response) => { // non-404 error handler logger.info('Creating non-404 status handler'); -app.use((_error: unknown, _request: express.Request, response: express.Response, _next: express.NextFunction) => { +app.use((error: unknown, request: express.Request, response: express.Response, next: express.NextFunction) => { + if (response.headersSent) { + return next(error); + } + + request.log.error(request, 'Request failed!'); return serverError(response, ApiErrorCode.UNKNOWN_ERROR); }); diff --git a/apps/miiverse-api/src/types/mongoose/post.ts b/apps/miiverse-api/src/types/mongoose/post.ts index a9354c7d..ae4614c5 100644 --- a/apps/miiverse-api/src/types/mongoose/post.ts +++ b/apps/miiverse-api/src/types/mongoose/post.ts @@ -57,6 +57,8 @@ export interface IPost { // on input but not output // We really need an ORM type PostDefaultedFields = + 'id' | // generated in save hook + 'body' | 'is_autopost' | 'is_community_private_autopost' | 'is_spoiler' |