Aggiornamento grafica
This commit is contained in:
@@ -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,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({
|
||||
|
||||
Reference in New Issue
Block a user