@furystack/rest-service
Advanced tools
Comparing version 2.2.6 to 2.3.0
@@ -16,4 +16,4 @@ import { Constructable } from '@furystack/inject'; | ||
}; | ||
result: string; | ||
result: {}; | ||
}>; | ||
//# sourceMappingURL=create-delete-endpoint.d.ts.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
await dataSet.remove(injector, id); | ||
return rest_1.PlainTextResult('', 204); | ||
return rest_1.JsonResult({}, 204); | ||
}; | ||
@@ -21,0 +21,0 @@ return endpoint; |
@@ -16,13 +16,6 @@ import { Constructable } from '@furystack/inject'; | ||
urlParams: { | ||
/** | ||
* Creates a PATCH endpoint for updating entities | ||
* | ||
* @param options The options for endpoint creation | ||
* @param options.model The Model class | ||
* @returns a boolean that indicates the success | ||
*/ | ||
id: T[keyof T]; | ||
}; | ||
result: string; | ||
result: {}; | ||
}>; | ||
//# sourceMappingURL=create-patch-endpoint.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
await dataSet.update(injector, id, patchData); | ||
return rest_1.PlainTextResult(''); | ||
return rest_1.JsonResult({}); | ||
}; | ||
@@ -23,0 +23,0 @@ return endpoint; |
@@ -30,3 +30,3 @@ "use strict"; | ||
expect(response.statusCode).toBe(200); | ||
expect(response.body).toBe(''); | ||
expect(response.body).toBe('{}'); | ||
const updated = await i.getDataSetFor(utils_2.MockClass).get(i, 'mock'); | ||
@@ -33,0 +33,0 @@ expect(updated === null || updated === void 0 ? void 0 : updated.value).toBe('updated'); |
{ | ||
"name": "@furystack/rest-service", | ||
"version": "2.2.6", | ||
"version": "2.3.0", | ||
"description": "Repository implementation for FuryStack", | ||
@@ -34,8 +34,8 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@furystack/core": "^9.1.13", | ||
"@furystack/inject": "^4.0.41", | ||
"@furystack/logging": "^2.0.48", | ||
"@furystack/repository": "^4.0.3", | ||
"@furystack/rest": "^1.2.6", | ||
"@furystack/utils": "^1.2.11", | ||
"@furystack/core": "^9.1.14", | ||
"@furystack/inject": "^4.0.42", | ||
"@furystack/logging": "^2.0.49", | ||
"@furystack/repository": "^4.0.4", | ||
"@furystack/rest": "^1.3.0", | ||
"@furystack/utils": "^1.2.12", | ||
"hash.js": "^1.1.7", | ||
@@ -48,4 +48,4 @@ "path-to-regexp": "^6.2.0", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.15", | ||
"@types/node": "^14.14.9", | ||
"@types/jest": "^26.0.16", | ||
"@types/node": "^14.14.10", | ||
"@types/uuid": "^8.0.0", | ||
@@ -55,3 +55,3 @@ "got": "^11.8.0" | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "9af051b8717103d81efabb95f675d116cd5421d3" | ||
"gitHead": "a4192e69dfbc0112c7167a1756d63f29a844f1a8" | ||
} |
import { Constructable } from '@furystack/inject' | ||
import { DeleteEndpoint, PlainTextResult } from '@furystack/rest' | ||
import { DeleteEndpoint, JsonResult } from '@furystack/rest' | ||
import '@furystack/repository' | ||
@@ -17,5 +17,5 @@ | ||
await dataSet.remove(injector, id) | ||
return PlainTextResult('', 204) | ||
return JsonResult({}, 204) | ||
} | ||
return endpoint | ||
} |
@@ -31,3 +31,3 @@ import { usingAsync } from '@furystack/utils' | ||
expect(response.statusCode).toBe(200) | ||
expect(response.body).toBe('') | ||
expect(response.body).toBe('{}') | ||
const updated = await i.getDataSetFor(MockClass).get(i, 'mock') | ||
@@ -34,0 +34,0 @@ expect(updated?.value).toBe('updated') |
import { Constructable } from '@furystack/inject' | ||
import { PatchEndpoint, PlainTextResult } from '@furystack/rest' | ||
import { JsonResult, PatchEndpoint } from '@furystack/rest' | ||
import '@furystack/repository' | ||
@@ -19,5 +19,5 @@ import '../incoming-message-extensions' | ||
await dataSet.update(injector, id, patchData) | ||
return PlainTextResult('') | ||
return JsonResult({}) | ||
} | ||
return endpoint | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
316338
4749
Updated@furystack/core@^9.1.14
Updated@furystack/inject@^4.0.42
Updated@furystack/logging@^2.0.49
Updated@furystack/repository@^4.0.4
Updated@furystack/rest@^1.3.0
Updated@furystack/utils@^1.2.12