437 Commits

Author SHA1 Message Date
Wyatt Verchere
e06a77af28
Adds code coverage (#757)
* coverage initial push

* compiles on PR

* adds db env variable

* fixed env variables being on the wrong action

* added more tests yml code

* refresh

* tried copying over tests.yml

* removed accidental tests

* shotgun attempts

* generated yml

* more tries

* shotgun again

* small mistakes

* repush

* repush

* Adds env variables to tarp

* removes unused actions and tests cfg attribute on main.rs

* only will work on push to master

* changed to 60%

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-11-17 17:58:15 -08:00
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
375f992a0c
Adds ordering on loader fields enum (#755)
* now sorts on ordering, fmt clippy prepare

* fixed tests

* removed accidenetal printlns
2023-11-13 19:19:06 -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
Carter
97ccb7df94
Knossos Oauth 2 Flow Changes (#752)
* adjust type and response format

* Replace Found with Ok for handled redirects

* scope parse fix

* change apps query from body to query

* adjust tests for new response type

* remove unused imports

* Clippy fixes
2023-11-11 10:42:01 -07:00
Geometrically
a818199b5a
fix download counts for ipv4 ips (#750) 2023-11-08 20:55:08 -07:00
Geometrically
aab95444a8
Fix download counts (#746) (#747)
* Fix download counts (#746)

* Fix download counts

* remove unsafe send

* update indexing time

* run prep

* run prep again
2023-11-06 15:04:32 -07:00
Wyatt Verchere
40f28be3b4
rounds dates for revenue (#745)
* rounds dates for revenue

* analytics tests pass
2023-11-03 21:03:30 -07: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
d5594b03e3
Fix organizations route typo (#743) 2023-10-31 10:58:05 -05:00
Geometrically
89f1ddf4d7
Route to view user's orgs (#742) 2023-10-30 16:59:53 -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
Jackson Kruger
8803e11945
Upgrade to sqlx 0.7.2 (#736)
* Update to sqlx 0.7.2

* Somehow missed one (and remove queries from other branch)
2023-10-23 14:30:39 -05:00
Geometrically
9a8f3d7bad
Fix analytics routes + add revenue route (#734) 2023-10-19 09:42:49 -07:00
Wyatt Verchere
9d0e762f36
More tests (#729)
* permissions tests

* finished permissions; organization tests

* clippy, fmt

* post-merge fixes

* teams changes

* refactored to use new api

* fmt, clippy

* sqlx prepare

* revs

* revs

* re-tested

* re-added name

* reverted to matrix
2023-10-17 00:53:10 -07:00
Jackson Kruger
abf4cd71ba
Add redis caching to getting user notifications and projects [MOD-540] (#723)
* Add redis caching to getting a user's project ids

* Run `cargo sqlx prepare` to update the sqlx-data.json

* Add redis caching for getting user notifications

* Fix new clippy warnings

* Remove log that shouldn't have been committed

* Batch insert of notifications (untested)

* sqlx prepare...

* Fix merge conflict things and use new redis struct

* Fix bug with calling delete_many without any elements (caught by tests)

* cargo sqlx prepare

* Add tests around cache invalidation (and fix bug they caught!)

* Some test reorg based on code review suggestions
2023-10-12 15:52:24 -07:00
Geometrically
d66270eef0
Remove scheduling webhook check (#728) 2023-10-12 11:21:26 -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
BasiqueEvangelist
f1ff88f452
fix maven filters for versions with dashes (#725)
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-10-11 14:01:32 -07:00
Jackson Kruger
d92272ffa0
Batch inserts [MOD-555] (#726)
* Batch a bunch of inserts, but still more to do

* Insert many for clickhouse (+ tests)

* Batch the remaining ones except those requiring deduplication

* Risky dedups

* Bit o cleanup and formatting

* cargo sqlx prepare

* Add test around batch editing project categories

* Add struct to satisfy clippy

* Fix silly mistake that was caught by the tests!

* Leave room for growth in dummy_data
2023-10-11 11:32:58 -07:00
Jackson Kruger
dfa43f3c5a
Add /metrics endpoint for Prometheus (#724) 2023-10-06 15:58:02 -07:00
Wyatt Verchere
259c5ef3d0
Tests (#719)
* computer switch

* some fixes; github action

* added pr to master

* sqlx database setup

* switched intial GHA test db

* removed sqlx database setup

* unfinished patch route

* bug fixes + tests

* more tests, more fixes, cargo fmt

* merge fixes

* more tests, full reorganization

* fmt, clippy

* sqlx-data

* revs

* removed comments

* delete revs
2023-10-06 09:57:33 -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
Emma Alexia Triphora
58a61051b9
Don't show processing projects in thread message inbox (#722)
They already show up in the Review tab, so, no reason to also have them in the Messages tab
2023-10-01 13:22:29 -07:00
Emma Alexia Triphora
51777c3f33
Replace moderation project queue with moderation action log (#718) 2023-09-24 12:04:58 -04:00
Emma Alexia Triphora
3767e9fae9
Only show mod files in pack external dependencies (#710) 2023-09-24 11:49:41 -04:00
Emma Alexia Triphora
4bbfc8ccc5
Add NeoForge modpack and autoupdater support (#707) 2023-09-24 11:40:03 -04:00
Wyatt Verchere
531b8214c0
Analytics query (#716) 2023-09-24 11:22:35 -04:00
Emma Alexia Triphora
5cab618bf7
Fix reports sometimes being broken on the mod dashboard (#717) 2023-09-24 08:04:18 -05:00
Wyatt Verchere
3380f4d11c
downloads route (#713) 2023-09-20 08:11:09 -07:00
Wyatt Verchere
4bf030993a
Collections users route (#711)
* users route

* Added user route

* collections
2023-09-18 11:43:58 -07:00
Emma Alexia Triphora
f65f949a36
Fix issue with thread messages not being sent to moderators on non-processing projects (#705) 2023-09-15 15:39:03 -04:00
Julian Vennen
2864abd8c2
Add created and modified timestamp to search facets (#708) 2023-09-15 15:29:16 -04: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
Wyatt Verchere
35cd277fcf
analytics (#695)
* playtime

* other routes, improvements

* fmt clippy

* revs

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-09-13 16:35:47 -07:00
Emma Alexia Triphora
e6818023a3
Allow moderators to edit version info (#703)
* Allow moderators to edit version info

* Clippy fix
2023-09-11 14:21:50 -04:00
BasiqueEvangelist
35a541f99b
Maven version filters for duplicate version numbers (#625) 2023-09-10 12:59:10 -04:00
Konicai
5fb00a947c
Allow BungeeCord plugins that use bungee.yml (#698)
Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>
2023-09-10 12:49:35 -04:00
Modrinth Bot
6288f679b9
[no ci] synced file(s) with modrinth/.github (#706) 2023-09-10 12:45:44 -04:00
Geometrically
e766759b8c
Fix scheduling bug (#693)
* Fix scheduling bug

* Fix comp err
2023-08-23 12:08:18 -04:00
Wyatt Verchere
a1cfdf1a5b
Socket cleanup (#682)
* testing changes

* added success

* removed success

* Fix compile error

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
2023-08-21 14:21:05 -04:00
Emma Alexia Triphora
e9c7f5d664
Fix #683 (#691)
* Fix #683

* whitespace

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-08-21 10:44:09 -04:00
Emma Alexia Triphora
c85f12fe2c
Fix closing reports not marking the report as closed (#690)
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-08-21 10:43:06 -04:00
Geometrically
13e5644c89
Fix creator payouts + scheduler (#686) 2023-08-21 10:42:33 -04:00
Sasha Sorokin
eac029aef4
Webhook emojis update (#685) 2023-08-20 16:33:36 -04:00
Geometrically
a5195920fa
update validators (#678) 2023-08-08 14:27:38 -07:00
Geometrically
5676a13290
Fix sponge validator (#679) 2023-08-08 13:20:15 -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