Skip to content

Commit 2afd6e0

Browse files
committed
fix: make response field optional
1 parent e880d8d commit 2afd6e0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

adminforth/types/Back.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ export type CreateResourceRecordParams = {
577577
*
578578
* @deprecated Since 1.2.9. Will be removed in 2.0.0. Use extra.response instead.
579579
*/
580-
response: IAdminForthHttpResponse;
580+
response?: IAdminForthHttpResponse;
581581

582582
/**
583583
* Extra HTTP information. Prefer using extra.response over the top-level response field.
@@ -622,7 +622,7 @@ export type UpdateResourceRecordParams =
622622
*
623623
* @deprecated Since 1.2.9. Will be removed in 2.0.0. Use extra.response instead.
624624
*/
625-
response: IAdminForthHttpResponse;
625+
response?: IAdminForthHttpResponse;
626626

627627
/**
628628
* Extra HTTP information. Prefer using extra.response over the top-level response field.
@@ -667,7 +667,7 @@ export type UpdateResourceRecordParams =
667667
*
668668
* @deprecated Since 1.2.9. Will be removed in 2.0.0. Use extra.response instead.
669669
*/
670-
response: IAdminForthHttpResponse;
670+
response?: IAdminForthHttpResponse;
671671

672672
/**
673673
* Extra HTTP information. Prefer using extra.response over the top-level response field.
@@ -709,7 +709,7 @@ export type DeleteResourceRecordParams = {
709709
*
710710
* @deprecated Since 1.2.9. Will be removed in 2.0.0. Use extra.response instead.
711711
*/
712-
response: IAdminForthHttpResponse;
712+
response?: IAdminForthHttpResponse;
713713

714714
/**
715715
* Extra HTTP information. Prefer using extra.response over the top-level response field.
@@ -742,7 +742,7 @@ export type BeforeDeleteSaveFunction = (params: {
742742
adminUser: AdminUser,
743743
record: any,
744744
adminforth: IAdminForth,
745-
response: IAdminForthHttpResponse,
745+
response?: IAdminForthHttpResponse,
746746
extra?: HttpExtra,
747747
}) => Promise<{ok: boolean, error?: string}>;
748748

@@ -759,8 +759,6 @@ export type BeforeEditSaveFunction = (params: {
759759
extra?: HttpExtra,
760760
}) => Promise<{ok: boolean, error?: string | null}>;
761761

762-
763-
764762
export type BeforeCreateSaveFunction = (params: {
765763
resource: AdminForthResource,
766764
adminUser: AdminUser,

0 commit comments

Comments
 (0)