Skip to content

fix: Support custom Lobby API middleware#992

Merged
delucis merged 3 commits into
boardgameio:mainfrom
fladrif:fladrif/koa-router-middleware
Aug 27, 2021
Merged

fix: Support custom Lobby API middleware#992
delucis merged 3 commits into
boardgameio:mainfrom
fladrif:fladrif/koa-router-middleware

Conversation

@fladrif
Copy link
Copy Markdown
Contributor

@fladrif fladrif commented Aug 26, 2021

Allow user defined middleware to execute on boardgame.io defined routes.
Previously created routes were instantiated before user could define
middleware and thus they would not execute.

Checklist

  • Use a separate branch in your local repo (not main).
  • Test coverage is 100% (or you have a story for why it's ok).

fladrif and others added 2 commits August 26, 2021 15:18
Allow user defined middleware to execute on boardgame.io defined routes.
Previously created routes were instantiated before user could define
middleware and thus they would not execute.
@fladrif
Copy link
Copy Markdown
Contributor Author

fladrif commented Aug 27, 2021

Should this be a fix? It is fixing functionality that is expected (from the docs).

Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @fladrif! Do you think we could add a test for using a custom middleware?

@fladrif
Copy link
Copy Markdown
Contributor Author

fladrif commented Aug 27, 2021

Sure, can do.

@delucis
Copy link
Copy Markdown
Member

delucis commented Aug 27, 2021

Should this be a fix? It is fixing functionality that is expected (from the docs).

Yes, probably. Good point.

@delucis delucis changed the title feat: Move game server route creation to run fix: Support custom Lobby API middleware Aug 27, 2021
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks @fladrif!

@delucis delucis merged commit 8b871ab into boardgameio:main Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants