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: {
|
include: {
|
||||||
project: true,
|
project: true,
|
||||||
versions: {
|
versions: {
|
||||||
where: { isActive: true },
|
|
||||||
orderBy: { versionNumber: 'desc' },
|
orderBy: { versionNumber: 'desc' },
|
||||||
take: 1,
|
|
||||||
include: {
|
include: {
|
||||||
comments: {
|
comments: {
|
||||||
orderBy: { timestamp: 'asc' },
|
orderBy: { timestamp: 'asc' },
|
||||||
@@ -126,7 +124,7 @@ export async function PATCH(request: NextRequest, { params }: RouteParams) {
|
|||||||
|
|
||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
const { title, description, position } = body;
|
const { title, description, position } = body;
|
||||||
|
|
||||||
// Validate types before using string methods to prevent type confusion attacks
|
// Validate types before using string methods to prevent type confusion attacks
|
||||||
const updateData: Record<string, unknown> = {};
|
const updateData: Record<string, unknown> = {};
|
||||||
if (typeof title === 'string') updateData.title = title.trim();
|
if (typeof title === 'string') updateData.title = title.trim();
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ export async function GET(request: NextRequest, { params }: RouteParams) {
|
|||||||
include: {
|
include: {
|
||||||
project: true,
|
project: true,
|
||||||
versions: {
|
versions: {
|
||||||
where: { isActive: true },
|
|
||||||
orderBy: { versionNumber: 'desc' },
|
orderBy: { versionNumber: 'desc' },
|
||||||
take: 1,
|
|
||||||
...(includeComments ? {
|
...(includeComments ? {
|
||||||
include: {
|
include: {
|
||||||
comments: {
|
comments: {
|
||||||
|
|||||||
Reference in New Issue
Block a user