Skip to content

Is it possible to add more fields to participant? #142

Answered by Drarig29
zestsystem asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Sorry for the delay...

For this, what you should do is insert participants yourself, and then use their id in the seeding.

Example:

import { BracketsManager } from 'brackets-manager';
import { JsonDatabase } from 'brackets-json-db';

const storage = new JsonDatabase();
const manager = new BracketsManager(storage);

const tournamentId = 1;

const participants = [
    { tournament_id: tournamentId, name: 'John', nationality: 'english', imageUrl: 'https://example.org/image.png' },
    { tournament_id: tournamentId, name: 'Nicolas', nationality: 'french', imageUrl: 'https://example.org/image.png' },
    { tournament_id: tournamentId, name: 'Alberto', nationality: 'italian', imageUrl: 'htt…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zestsystem
Comment options

@Drarig29
Comment options

@zestsystem
Comment options

@Drarig29
Comment options

Answer selected by Drarig29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants