MCPcopy Create free account
hub / github.com/monkeytypegame/monkeytype / addCustomTheme

Function addCustomTheme

backend/src/api/controllers/user.ts:829–837  ·  view source on GitHub ↗
(
  req: MonkeyRequest<undefined, AddCustomThemeRequest>,
)

Source from the content-addressed store, hash-verified

827}
828
829export async function addCustomTheme(
830 req: MonkeyRequest<undefined, AddCustomThemeRequest>,
831): Promise<AddCustomThemeResponse> {
832 const { uid } = req.ctx.decodedToken;
833 const { name, colors } = req.body;
834
835 const addedTheme = await UserDAL.addTheme(uid, { name, colors });
836 return new MonkeyResponse("Custom theme added", replaceObjectId(addedTheme));
837}
838
839export async function removeCustomTheme(
840 req: MonkeyRequest<undefined, DeleteCustomThemeRequest>,

Callers

nothing calls this directly

Calls 1

replaceObjectIdFunction · 0.90

Tested by

no test coverage detected