Commit Graph

79 Commits

Author SHA1 Message Date
Geometrically
fc577241bd Update deps (#859) 2024-01-14 12:36:11 -05:00
Geometrically
c0c5978028 Bump meilisearch version (#799) 2023-12-12 21:04:40 -07:00
Geometrically
d4f9c97cca Payouts code (#765)
* push to rebase

* finish most

* finish most

* Finish impl

* Finish paypal

* run prep

* Fix comp err
2023-11-29 11:00:08 -07:00
Wyatt Verchere
172b93d07f Tests v2 recreate (#760)
* added common project information; setup for v2 test change

* all tests now use with_test_environment

* progress, failing

* finished re-adding tests

* prepare

* cargo sqlx prepare -- --tests

* fmt; clippy; prepare

* sqlx prepare

* adds version_create fix and corresponding test

* merge fixes; rev

* fmt, clippy, prepare

* test cargo sqlx prepare
2023-11-25 14:42:39 -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
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
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
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
Geometrically
039d26feeb Add launcher analytics (#661)
* Add more analytics

* finish hydra move

* Finish websocket flow

* add minecraft account flow

* Finish playtime vals + payout automation
2023-08-02 14:43:04 -07:00
Geometrically
7fbb8838e7 Scoped PATs (#651)
* Scoped PATs

* fix threads issues

* fix migration
2023-07-10 16:44:40 -07:00
Geometrically
366ea63209 Fix session del (#650) 2023-07-08 22:07:11 -07:00
Geometrically
6c0ad7fe1a Sessions Route + Password Auth (#649)
* Sessions Route + Password Auth

* run prep + fix clippy

* changing passwords + logging in

* register login
2023-07-08 14:29:17 -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
Geometrically
150329dd4a Fix GV + Loader syncing on version create (#564)
* Fix GV + Loader syncing on version create

* Update rustc v
2023-03-12 16:42:25 -07:00
Geometrically
00d09aa01e Housekeeping + Fix DB perf issues (#542)
* Housekeeping + fix db perf issues

* run prep
2023-02-22 16:11:14 -07:00
Geometrically
afdab0300e Update Analytics req + Fix versions list (#529)
* Update Analytics req + Fix versions list

* Fix sentry support

* Fix lint
2023-02-01 10:08:02 -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
triphora
983e2df065 Miscellaneous improvements and removals (#502) 2022-12-23 15:19:15 -05: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
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
6e72be54cb R2 impl (#466)
* Add Cloudflare R2 impl

* Bump actix version

* Fix sec issues
2022-10-22 21:23:31 -07:00
Geometrically
ac3a17b178 Fix plugin validator, fix version urls, clippy lints, additional categories (#421) 2022-08-16 17:42:04 -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
Emma Cypress ⚘
68f7dc9512 Add auto-reporting inappropriate text content (#387)
* Add initial support for blocking inappropriate text content

To make something clear, **nothing** is automatically censored or
deleted as a result of this pull request. This pull request is
meant to add two things:
- Regenerate new IDs (project, version, user, etc.) with profanity
- Send reports to the moderators for new inappropriate content

* Make it build

* Fix logic issue

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2022-07-09 18:51:55 -07:00
Geometrically
4e97a3b3d5 More project type validators (#383) 2022-06-26 10:39:38 -07:00
Geometrically
cd514285d9 Fix rejected files showing in hash routes (#375)
* Fix rejected files showing in hash routes

* Run prepare and formatter

* Add modrinth.com exception for callback URLs

* run fmt
2022-06-18 14:09:37 -07:00
Geometrically
782bb11894 Secure auth route, fix quilt deps bug, optimize queries more (#374)
* Secure auth route, fix quilt deps bug, optimize queries more

* Add to_lowercase for multiple hashes functions
2022-06-17 16:56:28 -07:00
Geometrically
eaeff891d6 Reimplement old database code for better performance (#365) 2022-06-08 22:24:20 -07:00
Geometrically
f0ab40d748 Fix update route (#364)
* Fix version updates route

* Run formatter, fix clippy, run prepare
2022-06-08 21:17:17 -07:00
Geometrically
f860f57363 Fix version editing (#362) 2022-06-02 20:56:12 -07:00
4JX
d3b578fe8f Fix wrongfully parsed hashes for the version_files route(s) (#353)
* Fix wrongfully parsed hashes for the version_files route(s)

* Remove the hex dependency

* Remove unwraps

.

.

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2022-05-26 18:32:32 -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
Jai A
e7b41f9a4c Urgent fixes 2022-05-15 12:05:44 -07:00
Geometrically
dd0aed4614 Bump version (#348) 2022-05-15 09:27:02 -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
Geometrically
d1c0c9739d Shulkers of fixes (#327)
* Shulkers of fixes

* Fix validation message

* Update deps

* Bump docker image version
2022-03-27 19:12:42 -07:00
Geometrically
725f8571bb Fix deps, download URLs, remove duplicate deps (#310) 2022-02-26 21:16:11 -07:00
Geometrically
9492363b22 Fix uploading (#305)
* Upgrade rust-s3 to fix tokio panics

* Run fmt

* Update deps
2022-02-20 20:16:32 -07:00
Geometrically
eb4375258e Fix routing errors 2 + Version File Response (#290) 2022-02-06 17:54:01 -07:00
Geometrically
6bf5dbabee Upgrade to Actix V2, bump SQLX version, code cleanup, intergrate ratelimiter (#288)
* Upgrade to Actix V2, bump SQLX version, code cleanup, intergrate ratelimiter

* Add pack file path validation

* Fix compilation error caused by incorrect merge
2022-02-05 23:08:30 -07:00
Geometrically
384e14b32d Fix pack URL validation, Version file update route, and spaces in file download URLs (#275) 2022-01-09 15:35:01 -07:00
Geometrically
a54b2db81b Fix gallery creation validation and validators returning incorrect er… (#263)
* Fix gallery creation validation and validators returning incorrect errors

* Remove docker image

* Add URL validation for pack files

* Remove unneeded dependencies
2021-11-30 20:07:23 -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
Redblueflame
efa8d5c575 Added monitoring, limited concurent connections (#245)
* reduced the default, and added environment override.

* Using parse is more stable and doesn't fail CI this time :P

* Added support for monitoring
This support is currently basic, but it can be improved later down the road.

* Forgot scheduler file

* Added health check

* Cargo fix

* Update cargo.lock to avoid action fails.

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2021-09-20 21:26:16 -07:00
Geometrically
9ee92fb9e9 Project gallery, webhook fixes, remove cache, re-enable donation URLs (#222) 2021-07-19 11:30:39 -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