@@ -287,8 +287,8 @@ app.post("hello",
287287``` swift
288288// A Parse Hook Trigger route.
289289app.post (" score" , " save" , " before" ,
290- className : GameScore.className ,
291- triggerName : .beforeSave ) { req async throws -> ParseHookResponse< GameScore> in
290+ object : GameScore.self ,
291+ trigger : .beforeSave ) { req async throws -> ParseHookResponse< GameScore> in
292292 // Note that `ParseHookResponse<GameScore>` means a "successfull"
293293 // response will return a "GameScore" type.
294294 if let error: ParseHookResponse< GameScore> = checkHeaders (req) {
@@ -315,8 +315,8 @@ app.post("score", "save", "before",
315315
316316// Another Parse Hook Trigger route.
317317app.post (" score" , " find" , " before" ,
318- className : GameScore.className ,
319- triggerName : .beforeFind ) { req async throws -> ParseHookResponse< [GameScore]> in
318+ object : GameScore.self ,
319+ trigger : .beforeFind ) { req async throws -> ParseHookResponse< [GameScore]> in
320320 // Note that `ParseHookResponse<[GameScore]>` means a "successfull"
321321 // response will return a "[GameScore]" type.
322322 if let error: ParseHookResponse< [GameScore]> = checkHeaders (req) {
@@ -342,8 +342,8 @@ app.post("score", "find", "before",
342342
343343// Another Parse Hook Trigger route.
344344app.post (" user" , " login" , " after" ,
345- className : User.className ,
346- triggerName : .afterLogin ) { req async throws -> ParseHookResponse< Bool > in
345+ object : User.self ,
346+ trigger : .afterLogin ) { req async throws -> ParseHookResponse< Bool > in
347347 // Note that `ParseHookResponse<Bool>` means a "successfull"
348348 // response will return a "Bool" type. Bool is the standard response with
349349 // a "true" response meaning everything is okay or continue.
@@ -359,7 +359,7 @@ app.post("user", "login", "after",
359359
360360// A Parse Hook Trigger route for `ParseFile`.
361361app.on (" file" , " save" , " before" ,
362- triggerName : .beforeSave ) { req async throws -> ParseHookResponse< Bool > in
362+ trigger : .beforeSave ) { req async throws -> ParseHookResponse< Bool > in
363363 // Note that `ParseHookResponse<Bool>` means a "successfull"
364364 // response will return a "Bool" type. Bool is the standard response with
365365 // a "true" response meaning everything is okay or continue. Sending "false"
@@ -376,7 +376,7 @@ app.on("file", "save", "before",
376376
377377// Another Parse Hook Trigger route for `ParseFile`.
378378app.post (" file" , " delete" , " before" ,
379- triggerName : .beforeDelete ) { req async throws -> ParseHookResponse< Bool > in
379+ trigger : .beforeDelete ) { req async throws -> ParseHookResponse< Bool > in
380380 // Note that `ParseHookResponse<Bool>` means a "successfull"
381381 // response will return a "Bool" type. Bool is the standard response with
382382 // a "true" response meaning everything is okay or continue.
@@ -392,7 +392,7 @@ app.post("file", "delete", "before",
392392
393393// A Parse Hook Trigger route for `ParseLiveQuery`.
394394app.post (" connect" , " before" ,
395- triggerName : .beforeConnect ) { req async throws -> ParseHookResponse< Bool > in
395+ trigger : .beforeConnect ) { req async throws -> ParseHookResponse< Bool > in
396396 // Note that `ParseHookResponse<Bool>` means a "successfull"
397397 // response will return a "Bool" type. Bool is the standard response with
398398 // a "true" response meaning everything is okay or continue.
@@ -408,8 +408,8 @@ app.post("connect", "before",
408408
409409// Another Parse Hook Trigger route for `ParseLiveQuery`.
410410app.post (" score" , " subscribe" , " before" ,
411- className : GameScore.className ,
412- triggerName : .beforeSubscribe ) { req async throws -> ParseHookResponse< Bool > in
411+ object : GameScore.self ,
412+ trigger : .beforeSubscribe ) { req async throws -> ParseHookResponse< Bool > in
413413 // Note that `ParseHookResponse<Bool>` means a "successfull"
414414 // response will return a "Bool" type. Bool is the standard response with
415415 // a "true" response meaning everything is okay or continue.
@@ -425,8 +425,8 @@ app.post("score", "subscribe", "before",
425425
426426// Another Parse Hook Trigger route for `ParseLiveQuery`.
427427app.post (" score" , " event" , " after" ,
428- className : GameScore.className ,
429- triggerName : .afterEvent ) { req async throws -> ParseHookResponse< Bool > in
428+ object : GameScore.self ,
429+ trigger : .afterEvent ) { req async throws -> ParseHookResponse< Bool > in
430430 // Note that `ParseHookResponse<Bool>` means a "successfull"
431431 // response will return a "Bool" type. Bool is the standard response with
432432 // a "true" response meaning everything is okay or continue.
0 commit comments