-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(frontend): react query migration #513
Draft
JoshCLim
wants to merge
35
commits into
main
Choose a base branch
from
CHAOS-511-react-query-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…AOS-224-KHAOS-rewrite
* start implementing authorisation * feat(backend): implement extractor for AuthUser (user id) * feat(backend): implement extractor for SuperUser (user id + authZ) --------- Co-authored-by: kappamalone <[email protected]>
* start implementing authorisation * feat(backend): implement extractor for AuthUser (user id) * feat(backend): implement extractor for SuperUser (user id + authZ) * feat(backend): get existing or create new user for Google login * feat(backend): get name from Google user profile * feat(backend): update schema.prisma to include lowercase table names + updated_at default time for users --------- Co-authored-by: kappamalone <[email protected]>
* feat(ci): add postgres and migration to actions workflow * fix(ci): fix incorrect working directory
* feat(ci): add postgres and migration to actions workflow * fix(ci): fix incorrect working directory * fix(ci): ran cargo fmt and fix build errors
* feat(ci): add postgres and migration to actions workflow * fix(ci): fix incorrect working directory * fix(ci): ran cargo fmt and fix build errors * fix(ci): Incorrect working directory for cargo fmt * fix(ci): rust-cache keys
* feat(ci): add postgres and migration to actions workflow * fix(ci): fix incorrect working directory * fix(ci): ran cargo fmt and fix build errors * fix(ci): Incorrect working directory for cargo fmt * fix(ci): rust-cache keys * fix(ci): add workspaces to rust-cache
* feat(ci): add postgres and migration to actions workflow * fix(ci): fix incorrect working directory * fix(ci): ran cargo fmt and fix build errors * fix(ci): Incorrect working directory for cargo fmt * fix(ci): rust-cache keys * fix(ci): add workspaces to rust-cache * fix(ci): cargo fmt remove manifest-path arg
* fix(ci): run CI on rewrite branch pull request * feat(docs): added endpoint docs for org and users
* feat(docs): updates to user and organisation api spec * feat(docs): draft spec for campaign api * fix(ci): update rust workflow to use actions/cache
* feat(backend): create sql migrations * feat(backend): remove prisma schema * fix(ci): change from prisma migration to sql * fix(ci): no default sqlx-cli features * fix(backend): remove duplicate primary key for applications * fix(backend): rename migrations to prepend 'create' * fix(ci): check for cached sqlx before installing with cargo * fix(ci): remove ci run on specific paths
* feat(db): add indexes for foreign key reference columns * fix(db): index naming and missing semicolons * dep(backend): update axum * fix(backend): remove testing jwt handlers * feat(backend): Add custom jwt validator and header * feat(backend): basic error handling enum * fix(backend): ran cargo fmt * fix(backend): remove unused imports
* feat(db): add indexes for foreign key reference columns * fix(db): index naming and missing semicolons * dep(backend): update axum * fix(backend): remove testing jwt handlers * feat(backend): Add custom jwt validator and header * feat(backend): basic error handling enum * fix(backend): ran cargo fmt * fix(backend): remove unused imports * Change to using `thiserror` * remove 'Error' from logic error names
* feat: Initial draft TODO: TESTING + more clarification * rearranged import * clear errors * post testing * feat(db): add indexes for foreign key reference columns * fix(db): index naming and missing semicolons * dep(backend): update axum * fix(backend): remove testing jwt handlers * feat(backend): Add custom jwt validator and header * feat(backend): basic error handling enum * fix(backend): ran cargo fmt * fix(backend): remove unused imports * CRUD operations - awaiting Campaign - haven't enforced db safety * implement feedback * Update rust.yml to include 224 branch * logic and style fixes * Change to using `thiserror` * add organisation_role type to db * update migration timestamps to be `NOT NULL` * change sqlx `time` to `chrono` * integrate organisations crud with error handling * return member role with org members * update sqlx type name for `UserRole` * simplify handlers to use new error type * removed unused imports * added `OrganisationAdmin` extractor * use `Transaction` when doing multiple queries * cargo fmt * add org route to app * move `Organisation` service functions into `Organisation` struct * moved org handlers into `OrganisationHandler` struct * ran cargo fmt * add S3 url generation to logo update * fixed error renaming * add routes to `main.rs` * cargo fmt --------- Co-authored-by: Alexander <[email protected]> Co-authored-by: Kavika <[email protected]>
* boilerplate for campaign * service layer for get, patch,put delete * handler updates * handler layer finalised * updated campaigns * fixed patch issue * remove empty `service/campaign.rs` file * add `organisation_name` to campaign details response * fix indentation of query code * change `cover_image` column type to UUID * minor changes * ran `cargo fmt` * remove unused `state` param * insert `organisation_id` when creating new campaign * change `organisations` logo column to `UUID` --------- Co-authored-by: Kavika <[email protected]>
* feat: added Role struct in model, implmented get and post for Role, updated api ymal for Role, added migration to change Role table in db * feat:added methods for delte and update role;added handler for role and added some routes into main regarding role * feat: added more api yaml documentation, added handler for create and get all roles in a campaign, added get all in roles in a campagin in model * fix: changed get_roles to Campaign Handler, changede migration file * change all id columns to `BIGINT` or `BIGSERIAL` * create `RoleAdmin` struct * move `create_role()` to `CampaignHandler` * cleanup * ran cargo fmt --------- Co-authored-by: Alex_Miao_WSL <[email protected]> Co-authored-by: Kavika <[email protected]>
* feat: added model file for application; added create method. fix: changed schema for application_role, fixed id type for role. * attempt to implement get for application; added additional fields for role response struct * added additional field to Application response type * feat: added get methods for application in model * fix pool usage in model/role, added set_status methods to application, patched API routes for get_all routes * added handlers for application; implemented Auth for ApplicationAdmin * added routes for applications in main; implement more handlers; moved some application handler methods to other more appropriate handlers * change `*Admin` `FromRequest` implementations to use HashMap of path variables * make 'Pending' the default Application status * return user info with `ApplicationDetails` --------- Co-authored-by: Alex_Miao_WSL <[email protected]> Co-authored-by: Kavika <[email protected]>
* added get_username for all users logged in * updted user crud * efficient user get fucntion * finished user but no testing * finished user crud * docker working file * set users `created_at` and `updated_at` to not null * set optional fields to `Option` in `User` struct * fix `query_as` with custom enums * finished user crud * changed User CRUD to use handler struct * move `User` DB logic to `models::User` file * add pronouns and gender to `User` * remove TODO comment * fixed errors and warnings with adding new user fields --------- Co-authored-by: Alex_Miao_WSL <[email protected]> Co-authored-by: Kavika <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
use
axios
instead offetch
use React query instead of useFetch hooks
#511