70 Commits

Author SHA1 Message Date
Wyatt Verchere
74973e73e6
Tests 3 restructure (#754)
* moved files

* moved files

* initial v3 additions

* moves req data

* tests passing, restructuring, remove v2

* fmt; clippy; prepare

* merge conflicts + issues

* merge conflict, fmt, clippy, prepare

* revs

* fixed failing test

* fixed tests
2023-11-16 11:36:03 -07:00
Wyatt Verchere
f4880d0519
more games information, games route (#756)
* more games information, games route

* adds banner url
2023-11-14 11:01:31 -07:00
Wyatt Verchere
ae1c5342f2
Search test + v3 (#731)
* search patch for accurate loader/gv filtering

* backup

* basic search test

* finished test

* incomplete commit; backing up

* Working multipat reroute backup

* working rough draft v3

* most tests passing

* works

* search v2 conversion

* added some tags.rs v2 conversions

* Worked through warnings, unwraps, prints

* refactors

* new search test

* version files changes fixes

* redesign to revs

* removed old caches

* removed games

* fmt clippy

* merge conflicts

* fmt, prepare

* moved v2 routes over to v3

* fixes; tests passing

* project type changes

* moved files over

* fmt, clippy, prepare, etc

* loaders to loader_fields, added tests

* fmt, clippy, prepare

* fixed sorting bug

* reversed back- wrong order for consistency

* fmt; clippy; prepare

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
2023-11-11 16:40:10 -08:00
Jackson Kruger
911d442340
Version ordering [MOD-551] (#740)
* Version ordering

* cargo sqlx prepare

* Use version ordering for maven

* Use version ordering when sorting versions in Rust (not just SQL)

* Thanks clippy
2023-11-01 09:36:39 -07:00
Jackson Kruger
6cfd4637db
OAuth 2.0 Authorization Server [MOD-559] (#733)
* WIP end-of-day push

* Authorize endpoint, accept endpoints, DB stuff for oauth clients, their redirects, and client authorizations

* OAuth Client create route

* Get user clients

* Client delete

* Edit oauth client

* Include redirects in edit client route

* Database stuff for tokens

* Reorg oauth stuff out of auth/flows and into its own module

* Impl OAuth get access token endpoint

* Accept oauth access tokens as auth and update through AuthQueue

* User OAuth authorization management routes

* Forgot to actually add the routes lol

* Bit o cleanup

* Happy path test for OAuth and minor fixes for things it found

* Add dummy data oauth client (and detect/handle dummy data version changes)

* More tests

* Another test

* More tests and reject endpoint

* Test oauth client and authorization management routes

* cargo sqlx prepare

* dead code warning

* Auto clippy fixes

* Uri refactoring

* minor name improvement

* Don't compile-time check the test sqlx queries

* Trying to fix db concurrency problem to get tests to pass

* Try fix from test PR

* Fixes for updated sqlx

* Prevent restricted scopes from being requested or issued

* Get OAuth client(s)

* Remove joined oauth client info from authorization returns

* Add default conversion to OAuthError::error so we can use ?

* Rework routes

* Consolidate scopes into SESSION_ACCESS

* Cargo sqlx prepare

* Parse to OAuthClientId automatically through serde and actix

* Cargo clippy

* Remove validation requiring 1 redirect URI on oauth client creation

* Use serde(flatten) on OAuthClientCreationResult
2023-10-30 09:14:38 -07:00
Geometrically
07ecd13554
Switch to Trolley for Modrinth Payments (#727)
* most of trolley

* Switch to trolley for payments

* run prepare

* fix clippy

* fix more

* Fix most tests + bitflags

* Update src/auth/flows.rs

Co-authored-by: Jackson Kruger <jak.kruger@gmail.com>

* Finish trolley

* run prep for merge

* Update src/queue/payouts.rs

Co-authored-by: Jackson Kruger <jak.kruger@gmail.com>

---------

Co-authored-by: Jackson Kruger <jak.kruger@gmail.com>
2023-10-11 15:55:01 -07:00
Wyatt Verchere
a1b59d4545
Organizations (#712)
* untested, unformatted, un-refactored

* minor simplification

* simplification fix

* refactoring, changes

* some fixes

* fixes, refactoring

* missed cache

* revs

* revs - more!

* removed donation links; added all org members to route

* renamed slug to title

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-10-02 10:56:57 -07:00
Wyatt Verchere
9bd2cb3c7e
Collections (#688)
* initial draft; unfinished

* images, fixes

* fixes

* println

* revisions

* fixes

* alternate context setup version

* rev

* partial revs

* rev

* clippy ,fmt

* fmt/clippy/prepare

* fixes

* revs
2023-09-13 22:22:32 -07:00
Geometrically
d11f0e864e
gv loader cache bring back (#677)
* gv loader cache bring back

* run prep fmt
2023-08-08 10:14:49 -07:00
Geometrically
df83fcc5b9
Optimizations (#676) 2023-08-07 23:05:08 -07:00
Geometrically
ec80c2b9db
Next auth fixes (#658) 2023-07-14 22:55:00 -07:00
Geometrically
4bdf9bff3a
2FA + Add/Remove Auth Providers (#652)
* 2FA + Add/Remove Auth Providers

* fix fmt issue
2023-07-11 19:13:07 -07:00
Geometrically
7fbb8838e7
Scoped PATs (#651)
* Scoped PATs

* fix threads issues

* fix migration
2023-07-10 16:44:40 -07:00
Geometrically
239214ef92
Initial Auth Impl + More Caching (#647)
* Port redis to staging

* redis cache on staging

* add back legacy auth callback

* Begin work on new auth flows

* Finish all auth flows

* Finish base session authentication

* run prep + fix clippy

* make compilation work
2023-07-07 12:20:16 -07:00
Wyatt Verchere
fe25cd3bec
Minos push (#589) (#590)
* Minos push (#589)

* moving to other computer

* working redirection

* incomplete pat setup

* no more errors

* new migrations

* fixed bugs; added user check

* pats

* resized pats

* removed testing callback

* lowered kratos_id size

* metadata support

* google not working

* refactoring

* restructured github_id

* kratos-id optional, legacy accounts connect

* default picture

* merge mistake

* clippy

* sqlx-data.json

* env vars, clippy

* merge error

* scopes into an i64, name

* requested changes

* removed banning

* partial completion of github flow

* revision

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-05-31 16:03:08 -07:00
Geometrically
3a6b9f04f9
Fix reports creation (#580) 2023-04-21 11:10:57 -07:00
Geometrically
a560f6e9f6
Monetization status, additional files fix, deps fix (#574) 2023-04-16 20:03:53 -07:00
Geometrically
95ae981698
Overhaul notifs + threads fixes (#573)
* Overhaul notifs + threads fixes

* fix lang
2023-04-15 19:48:21 -07:00
Geometrically
8f61e9876f
Add report + moderation messaging (#567)
* Add report + moderation messaging

* Add system messages

* address review comments

* Remove ds store

* Update messaging

* run prep

---------

Co-authored-by: Geometrically <geometrically@Jais-MacBook-Pro.local>
2023-04-12 17:59:43 -07:00
Geometrically
630a71c46c
Queue Dates + Warnings, some cleanup (#549)
* Queue Dates + Warnings, some cleanup

* Fix ping

* Fix repeated discord messaging

* Fix compile error + run fmt
2023-03-14 14:48:46 -07:00
Geometrically
26533c47e7
Add loaders + game versions param to mods (#528) 2023-01-27 19:24:40 -07:00
Geometrically
7d195367a8
Bulk Editing + Random Projects Route (#517)
* Bulk Editing + Random Projects Route

* Run fmt + clippy + prepare

* Remove license_url
2023-01-04 19:23:47 -07:00
Geometrically
5bb188a822
Project Colors (#512)
* Inital tests

* Finish project colors

* Run fmt + clippy + prepare

* Fix dp+rp fmting
2022-12-29 17:20:50 -07:00
Geometrically
fe256d6a62
File types (#506)
* File types

* Run prepare + fmt

* Switch to struct

* Update docker version
2022-12-23 16:36:53 -07:00
triphora
983e2df065
Miscellaneous improvements and removals (#502) 2022-12-23 15:19:15 -05:00
triphora
16d5a70c08
Add ordering to categories, gallery images, and team members (#501) 2022-12-23 14:34:04 -05:00
Geometrically
e809f77461
Public discord webhook (#492) 2022-12-06 19:51:03 -07:00
Geometrically
e96d23cc3f
Initial work on new status sys + scheduling releases (#489)
* Initial work on new status sys + scheduling releases

* Finish project statuses + begin work on version statuses

* Finish version statuses

* Regenerate prepare

* Run fmt + clippy
2022-12-06 09:14:52 -07:00
triphora
820519b4f7
Move to SPDX licenses (#449)
* Move to SPDX licenses

Found a way to do this without breaking API compat, so here it is, instead of waiting for v3

Resolves MOD-129
Resolves #396

* License URL updates

* what was I thinking

* Do a thing

* Add open source filter

* Remove dead imports

* Borrow

* Update 20220910132835_spdx-licenses.sql

* Add license text route

* Update migration

* Address comments
2022-11-29 21:53:24 -07:00
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
Geometrically
da19a07943
Payouts fees changes (#478)
* Payouts fees changes

* Update src/queue/payouts.rs

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

Co-authored-by: triphora <emmaffle@modrinth.com>
2022-11-16 13:46:36 -07:00
Geometrically
ecc500fc91
Fix payouts bug with decimals (#477) 2022-11-11 10:04:46 -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
wafflecoffee
411b8e3cb6
Initial work on site moderation improvements (#410) 2022-08-02 23:31:56 -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
Geometrically
d29d910ac6
Add mod lists for modpacks, liteloader support, update actix, fix moderation webhook (#357) 2022-05-26 10:08:19 -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
Danielle
3f671b918a
Move download counting to worker (#306)
* Move download counting to worker

* Run `cargo sqlx prepare`

* Format & some Clippy fixes
2022-02-21 19:57:40 -07:00
Geometrically
e576a58ead
Fix error messages, auth routes, and remove category unique constraint (#293)
* Fix error messages, auth routes, and remove category unique constraint

* Run prepare

* Remove debug secrets

* Fix team member editing
2022-02-10 10:56:45 -07:00
Geometrically
ffd9a34cf5
Query optimization (#235)
* Optimize version queries and decrease some query complexity

* Run formatter
2021-08-20 16:33:09 -07:00
Geometrically
b1bc7c1fc2
Add fields to gallery items (#234) 2021-08-05 22:01:26 -07:00
Geometrically
76b62eda3a
Allow gallery featuring, add gallery images to search, rename rejection reasons, transfer ownership route (#226) 2021-07-27 16:50:07 -07:00
Geometrically
9ee92fb9e9
Project gallery, webhook fixes, remove cache, re-enable donation URLs (#222) 2021-07-19 11:30:39 -07:00
Geometrically
d2c2503cfa
Final V2 Changes (#212)
* Redo dependencies, add rejection reasons, make notifications more readable

* Fix errors, add dependency route, finish PR

* Fix clippy errors
2021-06-16 09:05:35 -07:00
Geometrically
16db28060c
Project Types, Code Cleanup, and Rename Mods -> Projects (#192)
* Initial work for modpacks and project types

* Code cleanup, fix some issues

* Username route getting, remove pointless tests

* Base validator types + fixes

* Fix strange IML generation

* Multiple hash requests for version files

* Fix docker build (hopefully)

* Legacy routes

* Finish validator architecture

* Update rust version in dockerfile

* Added caching and fixed typo (#203)

* Added caching and fixed typo

* Fixed clippy error

* Removed log for cache

* Add final validators, fix how loaders are handled and add icons to tags

* Fix search module

* Fix parts of legacy API not working

Co-authored-by: Redblueflame <contact@redblueflame.com>
2021-05-30 15:02:07 -07:00
Jai A
853ead26ca
Register notification routes, add action method for notifications, and fix auto-featuring versions 2021-03-06 13:47:49 -07:00
Geometrically
0ccb6cb873
Follows (#172)
* Follows initial

* Fix #171, Fix #170, Fix #169, Fix #164

* More work on follows

* Fix compile error

* Upgrade meili version, add follows to search
2021-03-04 20:35:23 -07:00
Geometrically
109d7d87bd
Reports (#165)
* Reports WIP

* Finish reports

* Clippy fixes

Co-authored-by: Geometrically <geometrically@pop-os.localdomain>
2021-02-13 12:11:13 -07:00