mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 11:28:13 +03:00
Add BetaKeyDocument
This commit is contained in:
Vendored
+6
@@ -371,6 +371,12 @@ export interface PublicAPIKeyDocument extends MongoDBDocument {
|
||||
apiKey: string;
|
||||
permissions: PublicAPIPermissions;
|
||||
}
|
||||
export interface BetaKeyDocument extends MongoDBDocument {
|
||||
createdBy: integer;
|
||||
betakey: string;
|
||||
createdOn: integer;
|
||||
consumed: boolean;
|
||||
}
|
||||
export interface PublicAPIRequestDocument extends MongoDBDocument {
|
||||
key: PublicAPIKeyDocument;
|
||||
location: string;
|
||||
|
||||
@@ -712,7 +712,7 @@ const defaultDifficulty: Record<Game, string> = {
|
||||
usc: "EXH",
|
||||
};
|
||||
|
||||
function humaniseGame<T extends Game>(game: T, pt?: Playtypes[T]) {
|
||||
function humaniseGame<T extends Game>(game: T, pt?: Playtypes[T]): string {
|
||||
if (!pt) {
|
||||
return gameHuman[game];
|
||||
}
|
||||
|
||||
+10
-3
@@ -450,13 +450,13 @@ export interface UserGameStats<T extends Game> extends MongoDBDocument {
|
||||
}
|
||||
*/
|
||||
|
||||
type UserClasses = Partial<Record<Game, PlaytypeClasses>>;
|
||||
// type UserClasses = Partial<Record<Game, PlaytypeClasses>>;
|
||||
|
||||
type PlaytypeClasses = Partial<Record<Playtypes[Game], ClassInfo>>;
|
||||
// type PlaytypeClasses = Partial<Record<Playtypes[Game], ClassInfo>>;
|
||||
|
||||
// this one is just flat out wrong btw, there are very strict requirements
|
||||
// on what strings can go in here.
|
||||
type ClassInfo = Partial<Record<string, string>>;
|
||||
// type ClassInfo = Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
* PrivateUserDocument is the document indicating that we've returned everything about the user
|
||||
@@ -479,6 +479,13 @@ export interface PublicAPIKeyDocument extends MongoDBDocument {
|
||||
permissions: PublicAPIPermissions;
|
||||
}
|
||||
|
||||
export interface BetaKeyDocument extends MongoDBDocument {
|
||||
createdBy: integer;
|
||||
betakey: string;
|
||||
createdOn: integer;
|
||||
consumed: boolean;
|
||||
}
|
||||
|
||||
export interface PublicAPIRequestDocument extends MongoDBDocument {
|
||||
key: PublicAPIKeyDocument;
|
||||
location: string;
|
||||
|
||||
Reference in New Issue
Block a user