#58 change of member.roleProject

parent 1d73c96f
......@@ -82,7 +82,7 @@ const loadFixtures = async () => {
for (let i = 0; i < 5; i++) {
const newMember = new Member();
newMember.user = faker.helpers.arrayElement(users);
newMember.role=faker.helpers.objectValue(MemberRole);
newMember.roleProject=faker.helpers.objectValue(MemberRole);
await newMember.save();
members.push(newMember)
}
......
......@@ -22,7 +22,7 @@ import {
user: User;
project: Project;
createdAt: Date;
role: MemberRole;
roleProject: MemberRole;
}
......@@ -45,6 +45,6 @@ import {
enum: MemberRole,
default: MemberRole.USER
})
role!: MemberRole
roleProject!: MemberRole
}
\ No newline at end of file
......@@ -41,7 +41,7 @@ router.post('/', async (req:Request, res:Response): Promise<Response> => {
if(!user) return res.status(404).send({Message:'user not found'})
const member:Member = new Member;
member.user= user;
member.role= MemberRole.ADMIN;
member.roleProject= MemberRole.ADMIN;
await member.save();
const project : Project= new Project()
project.title = title;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment