@@ -7,17 +7,17 @@ import { Status } from "@aklinker1/zeta/status";
77export const restRoutes = createApp ( )
88 . use ( contextPlugin )
99 . get (
10- "/api/rest/chrome-extensions/:extensionId /screenshots/:screenshotIndex " ,
10+ "/api/rest/chrome-extensions/:id /screenshots/:index " ,
1111 {
1212 params : z . object ( {
13- extensionId : z . string ( ) ,
14- screenshotIndex : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
13+ id : z . string ( ) ,
14+ index : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
1515 } ) ,
1616 } ,
1717 async ( { params, chrome, set } ) => {
1818 const screenshotUrl = await chrome . getScreenshotUrl (
19- params . extensionId ,
20- params . screenshotIndex ,
19+ params . id ,
20+ params . index ,
2121 ) ;
2222 if ( ! screenshotUrl )
2323 throw new NotFoundError ( "Extension or screenshot not found" ) ;
@@ -27,17 +27,17 @@ export const restRoutes = createApp()
2727 } ,
2828 )
2929 . get (
30- "/api/rest/firefox-addons/:addonId/screenshots/:screenshotIndex " ,
30+ "/api/rest/firefox-addons/:addonId/screenshots/:index " ,
3131 {
3232 params : z . object ( {
3333 addonId : z . string ( ) ,
34- screenshotIndex : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
34+ index : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
3535 } ) ,
3636 } ,
3737 async ( { params, firefox, set } ) => {
3838 const screenshotUrl = await firefox . getScreenshotUrl (
3939 params . addonId ,
40- params . screenshotIndex ,
40+ params . index ,
4141 ) ;
4242 if ( ! screenshotUrl )
4343 throw new NotFoundError ( "Extension or screenshot not found" ) ;
0 commit comments