-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
Create a falcor route to create a new book within a world.
Authentication & Authorization
The current user must have write or owner permissions for the world in which the book is to be created.
Spec
Route (call): worldsById[id: string].books.push
Function Signature
function ( world_id : string, title : string ) : JSONGraphEnvelopeMongoDB
Create a new document for this world with the following parameters:
{
_id : string, // randomly generated
title: string,
created_at: Date.now(),
updated_at: Date.now(),
}Neo4j
Merge (:Book)-[:IN]->(:World) with the following properties:
const Book = {
_id: bookId,
};
const World = {
_id: worldId,
};
const OF = {
archived: false,
created_at: Date.now(),
creator: userId, // user performing the operation
};Return Paths
Return the path to the new ref in worldsById[key: string].books per #9.
Changelog
- 201609191010PST(joshdmiller): fixed inconsistency with [falcor] idempotent book operations #9 to change relationship from
OFtoINandnametotitle.
Metadata
Metadata
Assignees
Labels
No labels