Skip to content

Commit

Permalink
fix: rename route
Browse files Browse the repository at this point in the history
  • Loading branch information
shaikzeeshan committed Feb 24, 2025
1 parent a769242 commit 2f4e15d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
15 changes: 6 additions & 9 deletions pipes/rewind/src/app/api/export-video/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ export async function POST(request: Request) {
return NextResponse.json({ error: "Invalid frame IDs" }, { status: 400 });
}

const response = await fetch(
"http://localhost:3030/api/create-video-from-frames",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ frame_ids: frameIds, fps: settings.fps ?? 0.5 }),
const response = await fetch("http://localhost:3030/frames/export", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
);
body: JSON.stringify({ frame_ids: frameIds, fps: settings.fps ?? 0.5 }),
});

if (!response.ok) {
throw new Error("Failed to export video");
Expand Down
5 changes: 1 addition & 4 deletions screenpipe-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2059,10 +2059,7 @@ pub fn create_router() -> Router<Arc<AppState>> {
// .route("/vision/stop", post(stop_vision_device))
// .route("/audio/restart", post(restart_audio_devices))
// .route("/vision/restart", post(restart_vision_devices))
.route(
"/api/create-video-from-frames",
post(create_video_from_frames_handler),
)
.route("/frames/export", post(create_video_from_frames_handler))
.layer(cors);

#[cfg(feature = "experimental")]
Expand Down

0 comments on commit 2f4e15d

Please sign in to comment.