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

Streamlined code & added workshop attachment feature #7

Closed
wants to merge 9 commits into from

Conversation

kurbaniec
Copy link
Contributor

No description provided.

Streamlining => remove redundant code & clear up project structure.
Removed some unused imports & more with the help of `cargo fix`.
Some build errors were left untouched by `cargo fix`.
Unused but valid code will be marked by `#[allow(dead_code)]`.
Last commit mentions build errors but build warning were meant.
Should make project structure a bit cleaner.
Also, the db models module re-exports the models from the initial schema.rs definition.
Should make project structure a bit cleaner. Also prefixed all structs with `Route` to distinguish them from `db` models better.
Added field to Route's NewWorkshop struct for attachments. When no attachments are given, default value (empty vector) will be used.
When creating workshops one can now pass attachments to it.
TODO:
* Adapt update & delete workshop to use attachments
* Update docs
* Update postman collection
When updating workshops one can now pass attachments to it.
Workshop delete does not need any modifications because "workshopattachments" table cascades values when a workshop is deleted.
Also fixed problem that "workshopattachments" table was not cleared when using `db_clear = true` in `Rocket.toml`.
TODO:
* Update docs
* Update postman collection
@kurbaniec
Copy link
Contributor Author

Rocket fails to build on latest nightly, see issue 89935 from https://github.com/rust-lang/rust/issues/.

@kurbaniec kurbaniec closed this Oct 20, 2021
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.

1 participant