Skip to content

CRUD ClanRoles / UI-UX#1202

Open
YouriDK wants to merge 5 commits intoZenoo:mainfrom
YouriDK:901---Clan-roles-(with-editable-name/permissions)
Open

CRUD ClanRoles / UI-UX#1202
YouriDK wants to merge 5 commits intoZenoo:mainfrom
YouriDK:901---Clan-roles-(with-editable-name/permissions)

Conversation

@YouriDK
Copy link
Copy Markdown
Contributor

@YouriDK YouriDK commented Dec 19, 2025

Implementation of Clan roles a lil a bit late xD

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@YouriDK YouriDK force-pushed the 901---Clan-roles-(with-editable-name/permissions) branch from b411df7 to 803dfbd Compare December 22, 2025 01:39
const role = await prisma.clanRole.create({
data: {
clanId: id,
name,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name should be checked for length, since it's limited to 50 in the schema

const role = await prisma.clanRole.update({
where: { id: roleId },
data: {
name: req.body.name,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, should be checked for length

Comment on lines +2112 to +2114
await prisma.clanRole.delete({
where: { id: roleId },
});
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we delete the Member role you attributed by default?
To be honest, I'm not sure why we have this member role, since it's not created on clan creation either, just in the single migration file.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember telling you about this default role, but since it can be deleted and is not created by default when we create a clan, I don't see a use for having it, we might as well remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this migration then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants