@@ -7,17 +7,17 @@ import { Status } from "@aklinker1/zeta/status";
7
7
export const restRoutes = createApp ( )
8
8
. use ( contextPlugin )
9
9
. get (
10
- "/api/rest/chrome-extensions/:extensionId /screenshots/:screenshotIndex " ,
10
+ "/api/rest/chrome-extensions/:id /screenshots/:index " ,
11
11
{
12
12
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 ) ,
15
15
} ) ,
16
16
} ,
17
17
async ( { params, chrome, set } ) => {
18
18
const screenshotUrl = await chrome . getScreenshotUrl (
19
- params . extensionId ,
20
- params . screenshotIndex ,
19
+ params . id ,
20
+ params . index ,
21
21
) ;
22
22
if ( ! screenshotUrl )
23
23
throw new NotFoundError ( "Extension or screenshot not found" ) ;
@@ -27,17 +27,17 @@ export const restRoutes = createApp()
27
27
} ,
28
28
)
29
29
. get (
30
- "/api/rest/firefox-addons/:addonId/screenshots/:screenshotIndex " ,
30
+ "/api/rest/firefox-addons/:addonId/screenshots/:index " ,
31
31
{
32
32
params : z . object ( {
33
33
addonId : z . string ( ) ,
34
- screenshotIndex : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
34
+ index : z . coerce . number ( ) . int ( ) . min ( 0 ) ,
35
35
} ) ,
36
36
} ,
37
37
async ( { params, firefox, set } ) => {
38
38
const screenshotUrl = await firefox . getScreenshotUrl (
39
39
params . addonId ,
40
- params . screenshotIndex ,
40
+ params . index ,
41
41
) ;
42
42
if ( ! screenshotUrl )
43
43
throw new NotFoundError ( "Extension or screenshot not found" ) ;
0 commit comments