Skip to content

Commit cbfa8e0

Browse files
authored
Merge pull request #291 from oliversalzburg/patch-1
Use appropriate handler
2 parents 268423d + f4c4fbb commit cbfa8e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/suggested-project-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jsonApi.start();
4848
The idea is to stick to having one resource per file and stick to pure config. Each file should do nothing more than define a resource. Handlers should be referenced from the `../handlers` folder, which enables us to easily abstract functionality by sharing features amongst handlers. Resource files are effectively defining your routing layer.
4949

5050
```javascript
51-
var commentHandler = require("../handlers/commentHandler.js");
51+
var photosHandler = require("../handlers/photosHandler.js");
5252

5353
jsonApi.define({
5454
resource: "photos",
55-
handlers: memoryHandler,
55+
handlers: photosHandler,
5656
attributes: {
5757
title: jsonApi.Joi.string()
5858
url: jsonApi.Joi.string().uri()

0 commit comments

Comments
 (0)