@ai0x0/utils 0.0.26 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/es/backend/route-operation/delete-operation.d.ts +1 -8
- package/es/backend/route-operation/get-list-operation.d.ts +1 -8
- package/es/backend/route-operation/get-operation.d.ts +1 -8
- package/es/backend/route-operation/post-operation.d.ts +1 -8
- package/es/backend/route-operation/post-operation.js +40 -41
- package/es/backend/route-operation/put-operation.d.ts +1 -9
- package/es/backend/route-operation/put-operation.js +40 -41
- package/eslint-rules/index.js +40 -0
- package/eslint-rules/no-antd-space.js +63 -0
- package/eslint-rules/no-consecutive-setstate.js +87 -0
- package/eslint-rules/no-hardcoded-style.js +437 -0
- package/eslint-rules/no-one-letter-vars.js +111 -0
- package/eslint-rules/no-then.js +40 -0
- package/eslint-rules/no-use-request-run.js +54 -0
- package/eslint-rules/require-form-convention.js +200 -0
- package/eslint-rules/require-pro-components.js +131 -0
- package/eslint-rules/require-section-divider.js +116 -0
- package/eslint-rules/require-use-form.js +77 -0
- package/lib/backend/route-operation/delete-operation.d.ts +1 -8
- package/lib/backend/route-operation/get-list-operation.d.ts +1 -8
- package/lib/backend/route-operation/get-operation.d.ts +1 -8
- package/lib/backend/route-operation/get-operation.js +3 -1
- package/lib/backend/route-operation/post-operation.d.ts +1 -8
- package/lib/backend/route-operation/post-operation.js +9 -8
- package/lib/backend/route-operation/put-operation.d.ts +1 -9
- package/lib/backend/route-operation/put-operation.js +9 -14
- package/package.json +2 -1
|
@@ -67,25 +67,20 @@ var createPutOperation = ({
|
|
|
67
67
|
]).handler(async (req) => {
|
|
68
68
|
try {
|
|
69
69
|
const { userId } = await getSession(req) || {};
|
|
70
|
-
const body =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
);
|
|
70
|
+
const body = await req.json();
|
|
71
|
+
const extraBody = await (setBody == null ? void 0 : setBody(
|
|
72
|
+
req
|
|
73
|
+
)) || {};
|
|
74
|
+
const mergedBody = { ...body, ...extraBody };
|
|
76
75
|
const raw = await (0, import_actions.createPutAction)({
|
|
77
76
|
bodySchema,
|
|
78
77
|
table,
|
|
79
78
|
db
|
|
80
|
-
})(
|
|
81
|
-
{
|
|
82
|
-
editorId: userId,
|
|
83
|
-
...body
|
|
84
|
-
},
|
|
85
|
-
{ byCreator }
|
|
86
|
-
);
|
|
79
|
+
})({ editorId: userId, ...mergedBody }, { byCreator });
|
|
87
80
|
const data = onSuccess ? await onSuccess(raw) : raw;
|
|
88
|
-
return import_next_rest_framework.TypedNextResponse.json(data, {
|
|
81
|
+
return import_next_rest_framework.TypedNextResponse.json(data, {
|
|
82
|
+
status: 200
|
|
83
|
+
});
|
|
89
84
|
} catch (e) {
|
|
90
85
|
if (!(e instanceof import_errors.HttpError))
|
|
91
86
|
console.error(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai0x0/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "AI0x0 utils",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai0x0"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"module": "./es/index.js",
|
|
21
21
|
"types": "./lib/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
|
+
"eslint-rules",
|
|
23
24
|
"lib",
|
|
24
25
|
"es",
|
|
25
26
|
"SKILL.md"
|