@oino-ts/db 1.0.0 → 1.0.1
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.
|
@@ -89,8 +89,8 @@ class OINODbDataModel extends common_1.OINODataModel {
|
|
|
89
89
|
result += " AND ";
|
|
90
90
|
}
|
|
91
91
|
let value = decodeURIComponent(id_parts[i]);
|
|
92
|
-
if ((f instanceof common_1.OINONumberDataField) && (this.
|
|
93
|
-
value = this.
|
|
92
|
+
if ((f instanceof common_1.OINONumberDataField) && (this.dbApi.hashid)) {
|
|
93
|
+
value = this.dbApi.hashid.decode(value);
|
|
94
94
|
}
|
|
95
95
|
value = f.printCellAsValue(value);
|
|
96
96
|
if (value == "") { // ids are user input and could be specially crafted to be empty
|
|
@@ -86,8 +86,8 @@ export class OINODbDataModel extends OINODataModel {
|
|
|
86
86
|
result += " AND ";
|
|
87
87
|
}
|
|
88
88
|
let value = decodeURIComponent(id_parts[i]);
|
|
89
|
-
if ((f instanceof OINONumberDataField) && (this.
|
|
90
|
-
value = this.
|
|
89
|
+
if ((f instanceof OINONumberDataField) && (this.dbApi.hashid)) {
|
|
90
|
+
value = this.dbApi.hashid.decode(value);
|
|
91
91
|
}
|
|
92
92
|
value = f.printCellAsValue(value);
|
|
93
93
|
if (value == "") { // ids are user input and could be specially crafted to be empty
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/db",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "OINO TS library package for publishing an SQL database tables as a REST API.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"module": "./dist/esm/index.js",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@oino-ts/common": "1.0.
|
|
22
|
+
"@oino-ts/common": "1.0.1",
|
|
23
23
|
"oino-ts": "file:.."
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@oino-ts/types": "1.0.
|
|
26
|
+
"@oino-ts/types": "1.0.1",
|
|
27
27
|
"@types/bun": "^1.1.14",
|
|
28
|
-
"@types/node": "^21.0.
|
|
28
|
+
"@types/node": "^21.0.10",
|
|
29
29
|
"typescript": "~5.9.0"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
package/src/OINODbDataModel.ts
CHANGED
|
@@ -95,8 +95,8 @@ export class OINODbDataModel extends OINODataModel {
|
|
|
95
95
|
result += " AND "
|
|
96
96
|
}
|
|
97
97
|
let value = decodeURIComponent(id_parts[i])
|
|
98
|
-
if ((f instanceof OINONumberDataField) && (this.
|
|
99
|
-
value = this.
|
|
98
|
+
if ((f instanceof OINONumberDataField) && (this.dbApi.hashid)) {
|
|
99
|
+
value = this.dbApi.hashid.decode(value)
|
|
100
100
|
}
|
|
101
101
|
value = f.printCellAsValue(value)
|
|
102
102
|
if (value == "") { // ids are user input and could be specially crafted to be empty
|