18 lines
546 B
JavaScript
18 lines
546 B
JavaScript
'use strict'
|
|
|
|
const { getObjects, getObject, createObject, updateObject } = require( './controllers' )
|
|
|
|
// References (branches & tags)
|
|
const objects = require( 'express' ).Router( { mergeParams: true } )
|
|
|
|
module.exports = objects
|
|
|
|
objects.get( '/streams/:streamId/objects', getObjects )
|
|
|
|
objects.get( '/streams/:streamId/objects/:objectId', getObject )
|
|
|
|
objects.post( '/streams/:streamId/objects', createObject )
|
|
|
|
object.post( '/streams/:streamId/commits', ( ) => {} ) // TODO
|
|
|
|
objects.put( '/streams/:streamId/objects/:objectId', updateObject ) |