-
-
Save MrCube42/abb2c9dd2df99b5a6f21da2eb2f28597 to your computer and use it in GitHub Desktop.
Angedeutete Service-Implementierung zur Datenbeschaffung unserer Companions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class CompanionsService { | |
// … hier könnte z.B. eine Datenbankanbindung stattfinden | |
async findAll(): Promise<Companion[]> { | |
return await this.db.find(...).exec(); | |
} | |
async findDetailsById(id: string): Promise<CompanionDetails> { | |
const companionDetails = await this.db.findOne({ id }).exec(); | |
return companionDetails; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment