feat(houseofrc): create a race from a House of RC event and its entries (1.80.0)
This commit is contained in:
1 parent
42df6a786f
commit
9c1f5713e6
18 files changed
+444
-21
No files matched your search
@@ -488,6 +488,14 @@ app.post("/api/houseofrc/transponders", async (req, res) => {
|
||||
const result = await houseOfRc.lookupTransponders(req.body?.transponders);
|
||||
res.status(result.ok ? 200 : 502).json(result);
|
||||
});
|
||||
app.post("/api/houseofrc/events", async (req, res) => {
|
||||
const result = await houseOfRc.listEvents({ from: req.body?.from, to: req.body?.to, country: req.body?.country });
|
||||
res.status(result.ok ? 200 : 502).json(result);
|
||||
});
|
||||
app.post("/api/houseofrc/entries", async (req, res) => {
|
||||
const result = await houseOfRc.getEventEntries(req.body?.eventId, req.body?.eventclassId);
|
||||
res.status(result.ok ? 200 : result.status === 400 ? 400 : 502).json(result);
|
||||
});
|
||||
|
||||
app.post("/api/state", (req, res) => {
|
||||
if (!req.body || typeof req.body !== "object") {
|
||||
|
||||
Reference in new issue
Block a user