Skip to content

Commit d333940

Browse files
committed
fix: allow PUT method on snapshot config endpoint
The CLI sends PUT for config updates but the route only exported POST, causing a 405 Method Not Allowed error.
1 parent 1fd323e commit d333940

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/routes/api/configs/from-snapshot/+server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,6 @@ export const POST: RequestHandler = async ({ platform, cookies, request }) => {
188188
packages: createdPackages
189189
}, { status: 201 });
190190
};
191+
192+
// The CLI sends PUT for updates — route to the same handler.
193+
export const PUT: RequestHandler = POST;

0 commit comments

Comments
 (0)