Ignore:
Timestamp:
08/24/26 20:57:09 (13 days ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Parents:
a6e33d1
Message:

Added corrected entitef from the ER diagram and changes for the logic to be coresponding to the ddl

Location:
ChapterX.Application/Collaboration/Commands
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChapterX.Application/Collaboration/Commands/AddHandler.cs

    ra6e33d1 re882b92  
    2222                UserId = request.UserId,
    2323                StoryId = request.StoryId,
     24                Role = request.Role,
     25                PermissionLevel = request.PermissionLevel,
    2426                CreatedAt = DateTime.UtcNow
    2527            };
  • ChapterX.Application/Collaboration/Commands/AddRequest.cs

    ra6e33d1 re882b92  
    33namespace ChapterX.Application.Collaboration.Commands
    44{
    5     public record AddRequest(int UserId, int StoryId, string Role) : IRequest<AddResponse>;
     5    public record AddRequest(int UserId, int StoryId, string Role, int? PermissionLevel = null) : IRequest<AddResponse>;
    66}
  • ChapterX.Application/Collaboration/Commands/UpdateHandler.cs

    ra6e33d1 re882b92  
    2222                return new UpdateResponse(false);
    2323
    24             // No updatable fields on Collaboration entity
     24            collaboration.Role = request.Role;
     25            collaboration.PermissionLevel = request.PermissionLevel;
    2526
    2627            await _collaborationRepository.UpdateAsync(collaboration, cancellationToken);
  • ChapterX.Application/Collaboration/Commands/UpdateRequest.cs

    ra6e33d1 re882b92  
    33namespace ChapterX.Application.Collaboration.Commands
    44{
    5     public record UpdateRequest(int Id, string Role) : IRequest<UpdateResponse>;
     5    public record UpdateRequest(int Id, string Role, int? PermissionLevel = null) : IRequest<UpdateResponse>;
    66}
Note: See TracChangeset for help on using the changeset viewer.