That's a spicy meatball
* APIUtils additions * Socket and web server listen on dedicated ports (see denoland/deno socket issue created by ZombieB1309 on GitHub) * Coach and Server created automatically (untested) * Profile content functions split into 'managers' * Progression temporary implementation * Settings placed into profile content manager * Relationships and messages return temporary empty array * Socket targets defined, message delivery to target, exec returned (goes unused for now)
This commit is contained in:
@@ -8,3 +8,10 @@ route.router.get("/v2", (_rq, rs) => {
|
||||
if (config == null) rs.sendStatus(500);
|
||||
else rs.json(config);
|
||||
});
|
||||
|
||||
route.router.get('/v1/amplitude',
|
||||
APIUtils.setCacheAllowed,
|
||||
(_rq, rs) => {
|
||||
rs.json({AmplitudeKey: ""});
|
||||
}
|
||||
);
|
||||
13
src/routes/api/messages.ts
Normal file
13
src/routes/api/messages.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
|
||||
export const route = APIUtils.createRouter("/messages");
|
||||
|
||||
route.router.get('/v2/get',
|
||||
|
||||
APIUtils.Authentication,
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json([]); // temporary
|
||||
}
|
||||
|
||||
)
|
||||
17
src/routes/api/players.ts
Normal file
17
src/routes/api/players.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
|
||||
export const route = APIUtils.createRouter("/players");
|
||||
|
||||
route.router.get('/v1/progression/:id',
|
||||
|
||||
APIUtils.Authentication,
|
||||
|
||||
async (_rq, rs) => {
|
||||
rs.json({
|
||||
PlayerId: rs.locals.profile.getId(),
|
||||
Level: await rs.locals.profile.Progression.getLevel(), // await is temporary
|
||||
Xp: await rs.locals.profile.Progression.getXp()
|
||||
});
|
||||
}
|
||||
|
||||
);
|
||||
15
src/routes/api/relationships.ts
Normal file
15
src/routes/api/relationships.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import { AuthType } from "../../data/users.ts";
|
||||
|
||||
export const route = APIUtils.createRouter("/relationships");
|
||||
|
||||
route.router.get('/v2/get',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(_rq, rs) => {
|
||||
rs.json([]); // temporary
|
||||
}
|
||||
|
||||
);
|
||||
Reference in New Issue
Block a user