19 Commits

Author SHA1 Message Date
Geometrically
f259d81249
FlameAnvil Project Sync (#481)
* FlameAnvil Project Sync

* Perm fixes

* Fix compile

* Fix clippy + run prepare
2022-11-20 19:50:14 -07:00
Tom Martin
ba28bc94d3
Fix all default clippy warnings (#480)
All trivial, fixes were for:
 - #[deny(clippy::if_same_then_else)]
 - #[warn(clippy::explicit_auto_deref)]
 - #[warn(clippy::bool_assert_comparison)]

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2022-11-17 10:09:53 -07:00
Geometrically
1d391e68e5
Better ser/deser for payouts vals (#474) 2022-11-08 14:14:07 -07:00
Geometrically
2c1bcaafc1
Use auto payments with paypal (#472)
* Use auto payments with paypal

* Remove sandbox key
2022-11-07 15:38:25 -07:00
Geometrically
2ca6e67b37
Payouts finish (#470)
* Almost done

* More work on midas

* Finish payouts backend

* Update Cargo.lock

* Run fmt + prepare
2022-10-30 23:34:56 -07:00
Geometrically
e7c3f8bf47
Initial work on payouts (badges, perms, splits) (#440)
* Initial work on payouts (badges, perms, splits)

* Fix clippy error, bitflag consistency
2022-09-02 12:38:58 -07:00
Geometrically
b04bced37f
More project data (#406)
* More project data

* Array_agg fixes + cleanup

* fix prepare

* Add approval dates to search

* Update migrations/20220725204351_more-project-data.sql

Co-authored-by: wafflecoffee <emmaffle@modrinth.com>

* Add category labels + display categories

Co-authored-by: wafflecoffee <emmaffle@modrinth.com>
2022-07-31 13:29:20 -07:00
wafflecoffee
b864791fa6
Limit 'superuser' status of current moderators (#386)
Resolves MOD-88

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2022-07-23 18:47:32 -07:00
Geometrically
80e00a80d5
Switch to time crate, add file sizes (#329)
* Switch to time crate, add file sizes

* Update deps, adjust pack format

* Run formatter, fix clippy
2022-03-29 19:35:09 -07:00
Leo Chen
13187de97d
Rustic cleanups, dedups and making the code less hard to read in general (#251)
* typos :help_me:

* (part 1/?) massive cleanup to make the code more Rust-ic and cut down heap allocations.

* (part 2/?) massive cleanup to make the code more Rust-ic and cut down heap allocations.

* (part 3/?) cut down some pretty major heap allocations here - more Bytes and BytesMuts, less Vec<u8>s

also I don't really understand why you need to `to_vec` when you don't really use it again afterwards

* (part 4/?) deduplicate error handling in backblaze logic

* (part 5/?) fixes, cleanups, refactors, and reformatting

* (part 6/?) cleanups and refactors

* remove loads of `as_str` in types that already are `Display`

* Revert "remove loads of `as_str` in types that already are `Display`"

This reverts commit 4f974310cfb167ceba03001d81388db4f0fbb509.

* reformat and move routes util to the util module

* use streams

* Run prepare + formatting issues

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2021-10-11 20:26:59 -07:00
Geometrically
157962e42a
Improve peformance of search indexing, v2 fixes + new routes (#205)
* Refactor search to not spam the database with queries, new utility routes for V2

* Run prepare
2021-06-02 18:33:11 -07:00
Geometrically
ec3c31a106
Move descriptions to database, switch to SHA-512 hashes, fix declining invites not working, allow user deletion, fix broken permission checks for many things, security fixes 2021-01-14 10:08:38 -07:00
Geometrically
0500994def
Moderation + Mod Editing (#101)
* Moderation + Mod Editing WIP

* Run prepare, fix perms

* Make it compile

* Finish moderation and edit routes

* More fixes

* Use better queries

* Final Fixes
2020-11-15 19:58:11 -07:00
Geometrically
578d673a4e
Team routes (#92)
* Team routes template

* More work on teams

* Updating routes WIP

* Edit routes

* Fixes

* Run prepare, prevent non-members from seeing perms

* More fixes

* Finish team routes

* More fixes

* Unpushed changes

* Some more fixes and error handling

* Fix sqlx prepare, formatting

Co-authored-by: Aeledfyr <aeledfyr@gmail.com>
2020-11-09 19:39:23 -07:00
Geometrically
68ee2bdcdc
Fix another GitHub OAuth Bug, allow users to register with null names. (#69)
* Change header name

* Add default bio value

* Remove default

* Make name null

* Run prepare
2020-10-03 16:31:10 -07:00
Aeledfyr
c4fb7b7928
General cleanup: fix some bugs, some refactoring (#65)
* Merged mod file upload in version creation, mod creation and
  version file add to one function;  This makes sure that they are
  consistent
* Made some fields on `User` optional: `github_id`, `avatar_url`, `bio`.
    * We may not want to publicly show the `github_id` to everyone
      with access to the API
    * If we allow non-github users, some of those fields would be
      invalid; some oauth providers may not have avatars or bios
* Made CORS origins should configurable
* Made `--reconfigure-indices` and `--reset-indices` exit after
  completion instead of starting the server
2020-09-30 22:07:52 -07:00
Jai A
2e514735ec User retrieval routes 2020-09-28 22:30:13 -07:00
Jai A
3d32c30d2d Authenticate protected routes 2020-09-28 21:05:42 -07:00
Jai A
05235f8385 Implement users in API 2020-09-28 10:48:15 -07:00