Load/render workspace alignment (#182)
* docs: plan load render workspace alignment * fix: normalize workspace status hydration * fix: avoid duplicate backlog hydration load * refactor: use sprint store active story * refactor: migrate solo to workspace store * chore: stabilize verification ignores
This commit is contained in:
parent
98ee05d458
commit
3b5cee823c
28 changed files with 1845 additions and 577 deletions
25
app/api/products/[id]/solo-workspace/route.ts
Normal file
25
app/api/products/[id]/solo-workspace/route.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { authenticateApiRequest } from '@/lib/api-auth'
|
||||
import { getSoloWorkspaceSnapshot } from '@/lib/solo-workspace-server'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
{ params }: { params: Promise<{ id: string }> },
|
||||
) {
|
||||
const auth = await authenticateApiRequest(request)
|
||||
if ('error' in auth) {
|
||||
return Response.json({ error: auth.error }, { status: auth.status })
|
||||
}
|
||||
|
||||
const { id } = await params
|
||||
const url = new URL(request.url)
|
||||
const sprintId = url.searchParams.get('sprint_id')
|
||||
const snapshot = await getSoloWorkspaceSnapshot(id, auth.userId, sprintId)
|
||||
|
||||
if (!snapshot) {
|
||||
return Response.json({ error: 'Solo workspace niet gevonden' }, { status: 404 })
|
||||
}
|
||||
|
||||
return Response.json(snapshot)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue