Skip to content

Commit

Permalink
chore: remove new router stuff
Browse files Browse the repository at this point in the history
it broke everything
  • Loading branch information
itschip committed Feb 5, 2024
1 parent a3b6499 commit 92450fc
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions apps/game/client/router-client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
import { createClient } from '@core/router';
import { AppRouter } from '../server/router-server';

export const client = createClient<AppRouter>();
1 change: 0 additions & 1 deletion apps/game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"lint": "eslint . --ext .ts"
},
"dependencies": {
"@core/router": "workspace:^",
"@discordjs/collection": "^0.2.4",
"@npwd/config": "workspace:*",
"@npwd/database": "workspace:*",
Expand Down
10 changes: 0 additions & 10 deletions apps/game/server/notes/notes.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ import { BeforeDBNote, DeleteNoteDTO, NoteItem, NotesEvents } from '@typings/not
import NotesService from './notes.service';
import { notesLogger } from './notes.utils';
import { onNetPromise } from '../lib/PromiseNetEvents/onNetPromise';
import { eventProcedure, router } from '../router-server';

export const notesRouter = router({
addNote: eventProcedure(NotesEvents.ADD_NOTE, async (reqObj, resp) => {
NotesService.handleAddNote(reqObj, resp).catch((e) => {
notesLogger.error(`Error occured in add note event (${reqObj.source}), Error: ${e.message}`);
resp({ status: 'error', errorMsg: 'UNKNOWN_ERROR' });
});
}),
});

onNetPromise<BeforeDBNote, NoteItem>(NotesEvents.ADD_NOTE, (reqObj, resp) => {
NotesService.handleAddNote(reqObj, resp).catch((e) => {
Expand Down
13 changes: 0 additions & 13 deletions apps/game/server/router-server.ts
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
import { initRouter } from '@core/router';
import { notesRouter } from './notes/notes.controller';

const t = initRouter.create();

export const router = t.router;
export const eventProcedure = t.eventProcedure;

const appRouter = router({
notes: notesRouter,
});

export type AppRouter = typeof appRouter;

0 comments on commit 92450fc

Please sign in to comment.