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

List my models on my profile page #343

Open
KevinDCarlson opened this issue Jan 27, 2025 · 1 comment
Open

List my models on my profile page #343

KevinDCarlson opened this issue Jan 27, 2025 · 1 comment
Labels
backend Backend, including web server and database frontend TypeScript frontend and Rust-wasm integrations tactical Typical engineering complexity

Comments

@KevinDCarlson
Copy link
Collaborator

It would enhance the profile page to have it run a query to the backend resulting in listing all models associated with the active username, so that people can stop having to manually track the Automerge hashes of all their models.

@KevinDCarlson KevinDCarlson added backend Backend, including web server and database frontend TypeScript frontend and Rust-wasm integrations tactical Typical engineering complexity labels Jan 27, 2025
@KevinDCarlson
Copy link
Collaborator Author

Here's the SQL query we'd like the front-end to make, with kevincarlson replaced by the current username and some questions about whether own is always what we want to search for. I don't know yet how you cause the front end to make such a query.

SELECT snapshots.for_ref, snapshots.content->>'name' as title
FROM snapshots
JOIN refs ON snapshots.for_ref = refs.id
JOIN permissions ON refs.id = permissions.object
JOIN users ON permissions.subject = users.id
WHERE users.username = 'kevincarlson'
AND permissions.level = 'own';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend, including web server and database frontend TypeScript frontend and Rust-wasm integrations tactical Typical engineering complexity
Projects
None yet
Development

No branches or pull requests

1 participant