Skip to content

Commit 75eaf18

Browse files
committed
fix: added id to the createItem response
1 parent 0406940 commit 75eaf18

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

assets/jscpd-badge.svg

Lines changed: 2 additions & 2 deletions
Loading

dist/FacadeConfig.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ItemIntoDocument from './types/ItemIntoDocument';
77
import TransactionHandler from './types/TransactionHandler';
88
export default interface FacadeConfig<I extends Item> {
99
readonly dataKeyName: string;
10-
readonly serverSideGeneratedIds?: boolean;
10+
readonly serverSideGeneratedIds: boolean;
1111
readonly totalHeaderName: string;
1212
readonly hasAfterHeaderName: string;
1313
readonly afterHeaderName: string;

src/functions/createItem/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const createItem: RequestHandlerFactory = <I extends Item>(
2525
res,
2626
}),
2727
});
28+
29+
req.body.id = id;
2830

2931
sendResponse({
3032
config,

0 commit comments

Comments
 (0)