Skip to content

Conversation

janepie
Copy link
Member

@janepie janepie commented Jul 28, 2025

adds OCS routes to

  • get the list of mailboxes for an account
  • get the list of mails in a mailbox

Copy link

welcome bot commented Jul 28, 2025

Thanks for opening your first pull request in this repository! ✌️

@janepie janepie force-pushed the feat/add-ocs-inbox-route branch 2 times, most recently from f459cda to ba32a24 Compare July 28, 2025 08:54
@janepie janepie force-pushed the feat/add-ocs-inbox-route branch from ba32a24 to 04063bb Compare July 28, 2025 09:01
@janepie janepie force-pushed the feat/add-ocs-inbox-route branch 5 times, most recently from cf675c2 to 4d368a7 Compare July 28, 2025 13:54
@janepie janepie marked this pull request as ready for review July 28, 2025 14:00
$userId,
$view
);
return new DataResponse(json_encode($messages), Http::STATUS_OK);
Copy link
Member

Choose a reason for hiding this comment

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

json_encode should not be necessary when using DataResponse, I think 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, removed :)

@janepie janepie force-pushed the feat/add-ocs-inbox-route branch 5 times, most recently from 89f3d55 to bb06df5 Compare July 29, 2025 13:49
* 200: Mailbox list
* 404: User was not logged in or account doesn't exist
*/
#[ApiRoute(verb: 'GET', url: '/mailbox/list')]
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: not happy about the URL design. /api/mailboxes is already taken by the internal API. How about /api/ocs/mailboxes or similar to have a new, dedicated sub path for public ocs APIs?

Copy link
Member Author

Choose a reason for hiding this comment

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

The api/ part is left out for the OCS routes for now, but I'm open to anything here. Could put ocs instead of api, so /ocs/mailboxes/list?

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with leaving out the api part for ocs. But please make it ocs/mailboxes without the list

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, done!

@janepie janepie force-pushed the feat/add-ocs-inbox-route branch from bb06df5 to a76eb7a Compare July 30, 2025 10:50
@janepie janepie requested a review from ChristophWurst July 30, 2025 11:15
Signed-off-by: Jana Peper <[email protected]>
@janepie janepie force-pushed the feat/add-ocs-inbox-route branch from a76eb7a to f6b793d Compare July 30, 2025 11:51
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

👍 otherwise :)

Co-authored-by: Christoph Wurst <[email protected]>
Signed-off-by: janepie <[email protected]>
@janepie janepie requested a review from ChristophWurst July 31, 2025 10:52
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@ChristophWurst ChristophWurst merged commit 0b86510 into main Jul 31, 2025
39 checks passed
@ChristophWurst ChristophWurst deleted the feat/add-ocs-inbox-route branch July 31, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants