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

Add the ability to fetch a registration application by person_id. #4913

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

dessalines
Copy link
Member

.route(
"/registration_application",
web::get().to(get_registration_application),
)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is called like : /admin/registration_application?person_id=X

I'm up for changing this API route to wherever.

@dullbananas
Copy link
Collaborator

I think it would be completely better to add it as a field in LocalUserView that's Some if the application exists and the viewer is an admin

@dessalines
Copy link
Member Author

dessalines commented Jul 21, 2024

That was my first inclination, but I looked at the front end, and we never return other peoples LocalUserView, or have that available.

Your LocalUserView only ever comes back for you as getsite.my_person, and viewing other people's profiles is always PersonView.

And doing a join there probably isn't the best, since it's admin only anyway.

I believe since this action is a modding-type action, it should work on-demand, similarly to getting reports for that user when you view a comment of theirs.

ie you see this as an option on a drowdown mod actions for a comment or post.

@dessalines dessalines merged commit 9738d87 into main Jul 23, 2024
2 checks passed
@SleeplessOne1917 SleeplessOne1917 deleted the registration_app_by_person branch August 1, 2024 17:23
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.

Add API ability to view registration application for a local user.
3 participants