Aggiornamento grafica

This commit is contained in:
Lorenzo Sanesi
2026-04-04 01:40:43 +02:00
parent e2fe8b264f
commit 162e0de62a
83 changed files with 16246 additions and 157 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
// eslint-disable-next-line import/no-import-module-exports
import { DataTypes } from 'sequelize';
const { DataTypes } = require('sequelize');
module.exports = sequelize => {
const { User, Group, FriendRequest, Friendship } = sequelize.models;
+13
View File
@@ -13,6 +13,19 @@ module.exports = sequelize => {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.TEXT,
allowNull: true,
},
isPrivate: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false,
},
avatarUrl: {
type: DataTypes.STRING,
allowNull: true,
},
},
{
timestamps: false,
@@ -10,10 +10,16 @@ const createGroupSchema = Joi.object({
'array.min': 'At least one member is required',
'array.base': 'Members must be an array',
}),
description: Joi.string().trim().max(500).optional(),
isPrivate: Joi.boolean().optional(),
avatarUrl: Joi.string().uri().optional(),
});
const updateGroupSchema = Joi.object({
name: Joi.string().trim().min(1).max(100).optional(),
description: Joi.string().trim().max(500).optional(),
isPrivate: Joi.boolean().optional(),
avatarUrl: Joi.string().uri().optional(),
});
const addMembersSchema = Joi.object({