feat: implement infinite mode with character selection and scoring; refactor daily character storage logic
This commit is contained in:
@@ -168,6 +168,17 @@ export async function getDailyModeCharacters(): Promise<CharacterWithRelations[]
|
||||
return applyCharacterOverrides(characters);
|
||||
}
|
||||
|
||||
export async function getAllCharacters(): Promise<CharacterWithRelations[]> {
|
||||
const characters = (await db
|
||||
.select(characterWithRelationsSelect)
|
||||
.from(character)
|
||||
.leftJoin(arc, eq(character.arcId, arc.id))
|
||||
.leftJoin(devilFruit, eq(character.devilFruitId, devilFruit.id))
|
||||
.all()) as CharacterWithRelations[];
|
||||
|
||||
return applyCharacterOverrides(characters);
|
||||
}
|
||||
|
||||
export async function getCharacterById(characterId: string): Promise<CharacterWithRelations | null> {
|
||||
const [found] = await db
|
||||
.select(characterWithRelationsSelect)
|
||||
|
||||
Reference in New Issue
Block a user