styles n stuff

This commit is contained in:
ntr committed 2022-09-18 20:26:57 +10:00
1 parent 6b8ebe3f35
commit 470270954f
7 files changed
+25 -10

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ async function start() {
} = createServices(log);
// events.emit(Events.StartupSync);
events.emit(Events.ListingsUpdated);
api.listen();
}
+4 -1
View File
@@ -52,7 +52,10 @@ export default function createPg(log: Log, prisma: PrismaClient): Pg {
async function userOffers(user: User) {
return prisma.offer.findMany({
where: { userId: user.id },
where: {
userId: user.id,
status: { not: Status.Declined }
},
include: {
want: true,
},
+5
View File
@@ -67,6 +67,11 @@ export default function createRpc(log: Log, pg: Pg, user: User, ws, discogs, off
async function receive(message: any): Promise<RpcMessage> {
const [msgType, params] = message;
if (!user) {
log.debug('anon rpc call');
return [RpcMessageType.Pong, []];
}
if (msgType !== RpcMessageType.Ping) log.info({ msgType, params }, 'rpc message');
// // this sucks but can't figure out how to convince typescript to agree yet