Skip to content

Commit

Permalink
chore: add debug logs to proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Sep 1, 2023
1 parent 1aa9172 commit f59757a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/discord-proxy/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class ProxyServer {

if (method === RequestMethod.Get) {
const cached = await this.cache.fetch(fullRoute);
this.logger.debug(cached, 'cache hit');
if (cached !== null) {
res.statusCode = 200;
res.setHeader('Content-Type', 'application/json');
Expand Down Expand Up @@ -63,6 +64,7 @@ export class ProxyServer {
}

const data = await parseResponse(discordResponse);
this.logger.debug(data, 'response');
res.write(JSON.stringify(data));

await this.cache.update(fullRoute, data);
Expand Down

0 comments on commit f59757a

Please sign in to comment.