Merged in feat/sw-3610-basicProfile (pull request #3144)
Feat(SW-3610): basic profile endpoint on protected layouts * Basic profile in protected layouts * . Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -64,6 +64,14 @@ export const userQueryRouter = router({
|
||||
|
||||
return parsedUser(user, false)
|
||||
}),
|
||||
getBasic: protectedProcedure.query(async function getBasicUser({ ctx }) {
|
||||
const user = await ctx.getScandicBasicUser()
|
||||
if (!user) {
|
||||
throw notFound()
|
||||
}
|
||||
|
||||
return user
|
||||
}),
|
||||
getWithExtendedPartnerData: safeProtectedProcedure.query(
|
||||
async function getUser({ ctx }) {
|
||||
if (!isValidSession(ctx.session)) {
|
||||
|
||||
Reference in New Issue
Block a user