This commit is contained in:
Travis Ralston 2018-10-20 18:59:26 -06:00
parent b8a01cc848
commit 509e985061

View File

@ -42,20 +42,20 @@ export class DimensionWebhooksService {
@POST @POST
@Path("room/:roomId/webhooks/new") @Path("room/:roomId/webhooks/new")
public async newWebhook(@QueryParam("scalar_token") scalarToken: string, @PathParam("roomId") roomId: string, request: WebhookOptions): Promise<WebhookConfiguration> { public async newWebhook(@QueryParam("scalar_token") scalarToken: string, @PathParam("roomId") roomId: string, options: WebhookOptions): Promise<WebhookConfiguration> {
const userId = await ScalarService.getTokenOwner(scalarToken); const userId = await ScalarService.getTokenOwner(scalarToken);
const webhooks = new WebhooksBridge(userId); const webhooks = new WebhooksBridge(userId);
return webhooks.createWebhook(roomId, request); return webhooks.createWebhook(roomId, options);
} }
@POST @POST
@Path("room/:roomId/webhooks/:hookId") @Path("room/:roomId/webhooks/:hookId")
public async updateWebhook(@QueryParam("scalar_token") scalarToken: string, @PathParam("roomId") roomId: string, @PathParam("hookId") hookId: string, request: WebhookOptions): Promise<WebhookConfiguration> { public async updateWebhook(@QueryParam("scalar_token") scalarToken: string, @PathParam("roomId") roomId: string, @PathParam("hookId") hookId: string, options: WebhookOptions): Promise<WebhookConfiguration> {
const userId = await ScalarService.getTokenOwner(scalarToken); const userId = await ScalarService.getTokenOwner(scalarToken);
const webhooks = new WebhooksBridge(userId); const webhooks = new WebhooksBridge(userId);
return webhooks.updateWebhook(roomId, hookId, request); return webhooks.updateWebhook(roomId, hookId, options);
} }
@DELETE @DELETE