Commit Graph

11 Commits (cb753b045fe90294051cc7a09855418f917dcc34)

Author SHA1 Message Date
Dessalines cb753b045f
Group imports dess (#2526)
* Group imports with rustfmt

* Running cargo fmt again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
2 years ago
Dessalines c9f1407429
Diesel 2.0.0 upgrade (#2452)
* Initial commit to bump diesel to 2.0.0-rc.0 and see what happens

* Add chrono feature from diesel

* db_schema crate is close to building?

* Upgrade diesel-derive-newtype

* Mostly modifying references to connections to be mutable ones; also used
new way to do migrations as suggested by the migration guide; a lot more
compiles now, though I can't figure out this tricky ToSql issue at the
moment

* Running clippy --fix

* Trying to fix drone clippy 1

* Fix clippy

* Upgrade clux-musl

* Trying to fix drone clippy 2

* Trying to fix drone clippy 3

* Trying to fix drone clippy 5

* Adding diesel table aliases, removing sql view hack. Fixes #2101

Co-authored-by: Steven Chu <stevenc1@gmail.com>
Co-authored-by: Nutomic <me@nutomic.com>
2 years ago
Dessalines 4e12e25c59
Adding admin purging of DB items and pictures. #904 #1331 (#1809)
* First pass at adding admin purge. #904 #1331

* Breaking out purge into 4 tables for the 4 purgeable types.

* Using CommunitySafe instead in view

* Fix db_schema features flags.

* Attempting to pass API key.

* Adding pictrs image purging

- Added pictrs_config block, for API_KEY
- Clear out image columns after purging

* Remove the remove_images field from a few of the purge API calls.

* Fix some suggestions by @nutomic.

* Add separate pictrs reqwest client.

* Update defaults.hjson

Co-authored-by: Nutomic <me@nutomic.com>
2 years ago
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2 years ago
dayinjing 7f9b55e793
Hide community v2 (#2055)
* Initial working of hiding communities and adding a db entry for mod log

* Return mod log for hidden communities

* Clean up hidding communities PR

* use lower case like other migration files

* Formatting fix

* pass in admin id to list, make match logic the same in post_view as community_view. Dont force non null for reason

* Clean PR review stuff

* Change person_id to mod_person_id on hide community table

* Make bools optional, add a space for formating

Co-authored-by: Thor Odinson <odinson@asgard.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2 years ago
Felix Ableitner f24999027e Merge crates db_schema and db_queries 3 years ago
Tmpod aef9786fa7
Add both (De)Serialize to all models (#1851) 3 years ago
Dessalines 6910e18a83 Adding ModTransferCommunity to modlog in API. Fixes #1437 3 years ago
Dessalines c3efb9f7cf Strictly typing DB id fields. Fixes #1498 3 years ago
Dessalines a869a2823b Still continuing on.... 3 years ago
Felix Ableitner 3b64c58198 Move most code into crates/ subfolder 3 years ago