Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

repro of issue #2

Merged
merged 7 commits into from
Jan 19, 2022
Merged

repro of issue #2

merged 7 commits into from
Jan 19, 2022

Conversation

KATT
Copy link
Member

@KATT KATT commented Jan 18, 2022

UPDATE: fixed in 7b61710 - closes #1

Please note that alternative solutions to the same problem are welcome too.


src/server.ts Outdated
@@ -99,44 +81,87 @@ export const appRouter = createRouter({
};
},
),
whoami: resolver(
// FIXME this doesn't work as epxected:
isAuthed(),
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't work

src/server.ts Outdated
Comment on lines 89 to 104
// async (params) => {
// if (!params.ctx.user) {
// return {
// error: {
// code: 'UNAUTHORIZED',
// },
// };
// }
// return params.next({
// ...params,
// ctx: {
// ...params.ctx,
// user: params.ctx.user,
// },
// });
// },
Copy link
Member Author

Choose a reason for hiding this comment

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

This works how I want isAuthed() to work

@KATT KATT merged commit 19baa3f into main Jan 19, 2022
@KATT KATT deleted the katt/issue-showcase branch January 19, 2022 04:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inferring the right error on contextSwapperMiddleware
1 participant