import express from 'express';
import { factionSystem } from '../../../../features/faction';

export async function FactionCreated(req: express.Request, res: express.Response): Promise<void> {
    if (!req.body.factionId) {
        res.status(400).send('Missing parameter');
    }

    if (!Number(req.body.factionId)) {
        res.status(500).send('Unable to parse given parameter');
    }

    factionSystem.loadFaction(Number(req.body.factionId));
    res.sendStatus(200);
}
