@@ -287,8 +287,8 @@ app.post("hello",
287
287
``` swift
288
288
// A Parse Hook Trigger route.
289
289
app.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
292
292
// Note that `ParseHookResponse<GameScore>` means a "successfull"
293
293
// response will return a "GameScore" type.
294
294
if let error: ParseHookResponse< GameScore> = checkHeaders (req) {
@@ -315,8 +315,8 @@ app.post("score", "save", "before",
315
315
316
316
// Another Parse Hook Trigger route.
317
317
app.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
320
320
// Note that `ParseHookResponse<[GameScore]>` means a "successfull"
321
321
// response will return a "[GameScore]" type.
322
322
if let error: ParseHookResponse< [GameScore]> = checkHeaders (req) {
@@ -342,8 +342,8 @@ app.post("score", "find", "before",
342
342
343
343
// Another Parse Hook Trigger route.
344
344
app.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
347
347
// Note that `ParseHookResponse<Bool>` means a "successfull"
348
348
// response will return a "Bool" type. Bool is the standard response with
349
349
// a "true" response meaning everything is okay or continue.
@@ -359,7 +359,7 @@ app.post("user", "login", "after",
359
359
360
360
// A Parse Hook Trigger route for `ParseFile`.
361
361
app.on (" file" , " save" , " before" ,
362
- triggerName : .beforeSave ) { req async throws -> ParseHookResponse< Bool > in
362
+ trigger : .beforeSave ) { req async throws -> ParseHookResponse< Bool > in
363
363
// Note that `ParseHookResponse<Bool>` means a "successfull"
364
364
// response will return a "Bool" type. Bool is the standard response with
365
365
// a "true" response meaning everything is okay or continue. Sending "false"
@@ -376,7 +376,7 @@ app.on("file", "save", "before",
376
376
377
377
// Another Parse Hook Trigger route for `ParseFile`.
378
378
app.post (" file" , " delete" , " before" ,
379
- triggerName : .beforeDelete ) { req async throws -> ParseHookResponse< Bool > in
379
+ trigger : .beforeDelete ) { req async throws -> ParseHookResponse< Bool > in
380
380
// Note that `ParseHookResponse<Bool>` means a "successfull"
381
381
// response will return a "Bool" type. Bool is the standard response with
382
382
// a "true" response meaning everything is okay or continue.
@@ -392,7 +392,7 @@ app.post("file", "delete", "before",
392
392
393
393
// A Parse Hook Trigger route for `ParseLiveQuery`.
394
394
app.post (" connect" , " before" ,
395
- triggerName : .beforeConnect ) { req async throws -> ParseHookResponse< Bool > in
395
+ trigger : .beforeConnect ) { req async throws -> ParseHookResponse< Bool > in
396
396
// Note that `ParseHookResponse<Bool>` means a "successfull"
397
397
// response will return a "Bool" type. Bool is the standard response with
398
398
// a "true" response meaning everything is okay or continue.
@@ -408,8 +408,8 @@ app.post("connect", "before",
408
408
409
409
// Another Parse Hook Trigger route for `ParseLiveQuery`.
410
410
app.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
413
413
// Note that `ParseHookResponse<Bool>` means a "successfull"
414
414
// response will return a "Bool" type. Bool is the standard response with
415
415
// a "true" response meaning everything is okay or continue.
@@ -425,8 +425,8 @@ app.post("score", "subscribe", "before",
425
425
426
426
// Another Parse Hook Trigger route for `ParseLiveQuery`.
427
427
app.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
430
430
// Note that `ParseHookResponse<Bool>` means a "successfull"
431
431
// response will return a "Bool" type. Bool is the standard response with
432
432
// a "true" response meaning everything is okay or continue.
0 commit comments