json-server 1.0.0-beta.13 → 1.0.0-beta.14
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 +1 -1
- package/lib/random-id.js +1 -1
- package/lib/service.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ Run `json-server --help` for a list of options
|
|
|
97
97
|
| <a href="https://mockend.com/" target="_blank"><img src="https://jsonplaceholder.typicode.com/mockend.svg" height="100px"></a> |
|
|
98
98
|
| <a href="https://zuplo.link/json-server-gh"><img src="https://github.com/user-attachments/assets/adfee31f-a8b6-4684-9a9b-af4f03ac5b75" height="100px"></a> |
|
|
99
99
|
| <a href="https://www.mintlify.com/"><img src="https://github.com/user-attachments/assets/bcc8cc48-b2d9-4577-8939-1eb4196b7cc5" height="100px"></a> |
|
|
100
|
-
| <a href="http://git-tower.com/?utm_source=husky&utm_medium=referral"><img height="100px" alt="tower-dock-icon-light" src="https://
|
|
100
|
+
| <a href="http://git-tower.com/?utm_source=husky&utm_medium=referral"><img height="100px" alt="tower-dock-icon-light" src="https://jsonplaceholder.typicode.com/tower-icon-and-logo-1400x260.png" /></a> |
|
|
101
101
|
| <a href="https://serpapi.com/?utm_source=typicode"><img height="100px" src="https://github.com/user-attachments/assets/52b3039d-1e4c-4c68-951c-93f0f1e73611" /></a>
|
|
102
102
|
|
|
103
103
|
|
package/lib/random-id.js
CHANGED
package/lib/service.js
CHANGED
|
@@ -104,7 +104,7 @@ export class Service {
|
|
|
104
104
|
const items = this.#get(name);
|
|
105
105
|
if (items === undefined || !Array.isArray(items))
|
|
106
106
|
return;
|
|
107
|
-
const item = { id: randomId()
|
|
107
|
+
const item = { ...data, id: randomId() };
|
|
108
108
|
items.push(item);
|
|
109
109
|
await this.#db.write();
|
|
110
110
|
return item;
|