You've already forked AstralRinth
forked from didirus/AstralRinth
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>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use super::ids::Base62Id;
|
||||
use crate::bitflags_serde_impl;
|
||||
use crate::models::ids::UserId;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -10,8 +11,7 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct PatId(pub u64);
|
||||
|
||||
bitflags::bitflags! {
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(transparent)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct Scopes: u64 {
|
||||
// read a user's email
|
||||
const USER_READ_EMAIL = 1 << 0;
|
||||
@@ -107,6 +107,8 @@ bitflags::bitflags! {
|
||||
}
|
||||
}
|
||||
|
||||
bitflags_serde_impl!(Scopes, u64);
|
||||
|
||||
impl Scopes {
|
||||
// these scopes cannot be specified in a personal access token
|
||||
pub fn restricted() -> Scopes {
|
||||
|
||||
Reference in New Issue
Block a user