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:
Linus Flood
2025-11-13 07:35:16 +00:00
parent dc53ab9245
commit 4b3dbadf24
4 changed files with 17 additions and 4 deletions

View File

@@ -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)) {