@@ -18,9 +18,9 @@ public class ChatController(IControllerInfrastructure controllerInfrastructure,
1818{
1919 [ HttpPost ( "internal/chats" ) ]
2020 [ SwaggerOperation ( Tags = [ SwaggerTagDescriptions . ENDPOINT_TAG_INTERNAL_CHAT ] ) ]
21- [ ProducesResponseType ( typeof ( string ) , StatusCodes . Status201Created ) ]
21+ [ ProducesResponseType ( typeof ( string ) , StatusCodes . Status200OK ) ]
2222 [ ProducesResponseType ( typeof ( ValidationProblemDetails ) , StatusCodes . Status400BadRequest ) ]
23- public async Task < IActionResult > AddAsync ( [ FromBody ] ChatBo newChatBo ) => Ok ( await chatService . AddAsync ( newChatBo ) ) ;
23+ public async Task < ActionResult < Guid > > AddAsync ( [ FromBody ] ChatBo newChatBo ) => Ok ( await chatService . AddAsync ( newChatBo ) ) ;
2424
2525 [ HttpGet ( "internal/chats/{chatId:guid}" ) ]
2626 [ SwaggerOperation ( Tags = [ SwaggerTagDescriptions . ENDPOINT_TAG_INTERNAL_CHAT ] ) ]
@@ -44,17 +44,6 @@ [FromQuery] [Required] Guid user2Id
4444 return Ok ( chat ) ;
4545 }
4646
47- [ HttpGet ( "internal/chats/get-or-create-by-user-pair" ) ]
48- [ SwaggerOperation ( Tags = [ SwaggerTagDescriptions . ENDPOINT_TAG_INTERNAL_CHAT ] ) ]
49- [ ProducesResponseType ( typeof ( ChatBo ) , StatusCodes . Status200OK ) ]
50- public async Task < ActionResult < ChatBo > > GetOrCreateChatByUserPairAsync ( [ FromQuery ] [ Required ] Guid user1Id ,
51- [ FromQuery ] [ Required ] Guid user2Id
52- )
53- {
54- var chat = await chatService . GetOrCreateChatByUserPairAsync ( user1Id , user2Id ) ;
55- return Ok ( chat ) ;
56- }
57-
5847 [ HttpGet ( "internal/chats/by-user/{userId:guid}" ) ]
5948 [ SwaggerOperation ( Tags = [ SwaggerTagDescriptions . ENDPOINT_TAG_INTERNAL_CHAT ] ) ]
6049 [ ProducesResponseType ( typeof ( IReadOnlyList < ChatBo > ) , StatusCodes . Status200OK ) ]
0 commit comments