LETS GO BABY
This commit is contained in:
23
projects/website/src/common/database/types/beatsaver-map.ts
Normal file
23
projects/website/src/common/database/types/beatsaver-map.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { Entity } from "dexie";
|
||||
import Database from "../database";
|
||||
import { BeatSaverMapToken } from "@ssr/common/types/token/beatsaver/beat-saver-map-token";
|
||||
|
||||
/**
|
||||
* A beat saver map.
|
||||
*/
|
||||
export default class BeatSaverMap extends Entity<Database> {
|
||||
/**
|
||||
* The hash of the map.
|
||||
*/
|
||||
hash!: string;
|
||||
|
||||
/**
|
||||
* The bsr code for the map.
|
||||
*/
|
||||
bsr!: string;
|
||||
|
||||
/**
|
||||
* The full data for the map.
|
||||
*/
|
||||
fullData!: BeatSaverMapToken;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import * as mongoose from "mongoose";
|
||||
|
||||
/**
|
||||
* Connects to the mongo database
|
||||
*/
|
||||
export async function connectMongo() {
|
||||
const connectionUri = process.env.MONGO_URI;
|
||||
if (!connectionUri) {
|
||||
throw new Error("Missing MONGO_URI");
|
||||
}
|
||||
await mongoose.connect(connectionUri);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { PlayerHistory } from "@/common/player/player-history";
|
||||
import { PlayerHistory } from "@ssr/common/types/player/player-history";
|
||||
|
||||
/**
|
||||
* Gets a value from an {@link PlayerHistory}
|
||||
|
@ -9,6 +9,15 @@ export function setPlayerIdCookie(playerId: string) {
|
||||
Cookies.set("playerId", playerId, { path: "/" });
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the player id cookie
|
||||
*
|
||||
* @returns the player id cookie
|
||||
*/
|
||||
export function getPlayerIdCookie() {
|
||||
return Cookies.get("playerId");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if we're in production
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as Comlink from "comlink";
|
||||
import { scoresaberService } from "@/common/service/impl/scoresaber";
|
||||
import { scoresaberService } from "@ssr/common/service/impl/scoresaber";
|
||||
|
||||
export interface WorkerApi {
|
||||
getPlayerExample: typeof getPlayerExample;
|
||||
|
Reference in New Issue
Block a user