mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
fix: Retrieve all video versions by removing the isActive filter and take limit from API queries.
This commit is contained in:
@@ -26,9 +26,7 @@ export async function GET(request: NextRequest, { params }: RouteParams) {
|
||||
include: {
|
||||
project: true,
|
||||
versions: {
|
||||
where: { isActive: true },
|
||||
orderBy: { versionNumber: 'desc' },
|
||||
take: 1,
|
||||
include: {
|
||||
comments: {
|
||||
orderBy: { timestamp: 'asc' },
|
||||
@@ -126,7 +124,7 @@ export async function PATCH(request: NextRequest, { params }: RouteParams) {
|
||||
|
||||
const body = await request.json();
|
||||
const { title, description, position } = body;
|
||||
|
||||
|
||||
// Validate types before using string methods to prevent type confusion attacks
|
||||
const updateData: Record<string, unknown> = {};
|
||||
if (typeof title === 'string') updateData.title = title.trim();
|
||||
|
||||
@@ -25,9 +25,7 @@ export async function GET(request: NextRequest, { params }: RouteParams) {
|
||||
include: {
|
||||
project: true,
|
||||
versions: {
|
||||
where: { isActive: true },
|
||||
orderBy: { versionNumber: 'desc' },
|
||||
take: 1,
|
||||
...(includeComments ? {
|
||||
include: {
|
||||
comments: {
|
||||
|
||||
Reference in New Issue
Block a user