Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create invite tRPC procedures #77

Open
L-Mario564 opened this issue Jun 19, 2024 · 4 comments
Open

Create invite tRPC procedures #77

L-Mario564 opened this issue Jun 19, 2024 · 4 comments
Assignees
Labels

Comments

@L-Mario564
Copy link
Contributor

For each procedure:

  • Apply rate limit middleware.

All inputs listed are required/must be defined unless stated with ? appended at the end of the variable name.

Cancel invite

Update Invite.status to cancelled.

Input: inviteId.

Conditions

  • The invite's byUserId must be of the session user.
  • Invite status should be of status pending.

Reject invite

Update Invite.status to rejected.

Input: inviteId.

Conditions

  • The invite's toUserId must be of the session user.
  • Invite status should be of status pending.
@ArtemOsuskyi ArtemOsuskyi self-assigned this Jul 24, 2024
@ArtemOsuskyi
Copy link
Collaborator

No accept invite?

@L-Mario564
Copy link
Contributor Author

Accepting an invite will perform different operations on the backend and database depending on the type of invite that's being accepted, so those procedures will live in under the router where they make most sense. For example, the procedure for accepting a staff team invite will add that user to the tournament's staff team so it'll go under the staff members router.

@ArtemOsuskyi
Copy link
Collaborator

Need a procedure to get all user invites as well probably @L-Mario564

@L-Mario564
Copy link
Contributor Author

Need a procedure to get all user invites as well probably @L-Mario564

Don't think a procedure is necessary, unless you're seeing a use case where they could be fetched from two or more parts in the codebase?

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

No branches or pull requests

2 participants