I hereby claim:
- I am remojansen on github.
- I am remojansen (https://keybase.io/remojansen) on keybase.
- I have a public key whose fingerprint is 95CF 4000 58A6 7EBF D965 2C32 C2E7 7CC5 4C37 06E7
To claim this, I am signing this object:
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| class Result<T, E = Error> { | |
| constructor( | |
| private v: T | undefined, | |
| private e: E | undefined | |
| ) {} | |
| onSuccess(cb: (v: T) => void) { | |
| if (this.v !== undefined) { | |
| cb(this.v as T); | |
| } | |
| } |
You can use the prompt to generate C4 documentation using GH Copilot. The sample response is for the Strapi ipen source project.
This middleware is used by all microservices. When the microservice is the auth service, it essentially invokes itself. When the microservice is not the auth service, it makes a remote call to the auth service.
Is this a good approach, or should I change the logic within the middleware so that the auth service avoids making a remote call to itself? Alternatively, should I use two different middlewares?
import type { ExpressMiddleware } from "@inversifyjs/http-express";
import type * as express from "express";
import { inject, injectable } from "inversify";
import {
type RemoteServiceClient,