Add placeholders for various routes that N1 uses.

This commit is contained in:
Halla Moore 2016-11-21 13:29:24 -08:00
parent 0fe6343137
commit 7906e3303d
5 changed files with 125 additions and 0 deletions

View file

@ -0,0 +1,27 @@
const Joi = require('joi');
// TODO: This is a placeholder
module.exports = (server) => {
server.route({
method: 'GET',
path: '/calendars',
config: {
description: 'Returns calendars.',
notes: 'Notes go here',
tags: ['metadata'],
validate: {
query: {
limit: Joi.number().integer().min(1).max(2000).default(100),
offset: Joi.number().integer().min(0).default(0),
view: Joi.string().valid('count'),
},
},
response: {
schema: Joi.array(),
},
},
handler: (request, reply) => {
reply('[]');
},
});
}

View file

@ -66,4 +66,21 @@ module.exports = (server) => {
})
},
})
// TODO: This is a placeholder
server.route({
method: 'GET',
path: '/contacts/rankings',
config: {
description: 'Returns contact rankings.',
notes: 'Notes go here',
tags: ['contacts'],
response: {
schema: Serialization.jsonSchema('Contact'),
},
},
handler: (request, reply) => {
reply('{}');
},
})
}

View file

@ -0,0 +1,27 @@
const Joi = require('joi');
// TODO: This is a placeholder
module.exports = (server) => {
server.route({
method: 'GET',
path: '/drafts',
config: {
description: 'Returns drafts.',
notes: 'Notes go here',
tags: ['drafts'],
validate: {
query: {
limit: Joi.number().integer().min(1).max(2000).default(100),
offset: Joi.number().integer().min(0).default(0),
view: Joi.string().valid('count'),
},
},
response: {
schema: Joi.array(),
},
},
handler: (request, reply) => {
reply('[]');
},
});
}

View file

@ -0,0 +1,27 @@
const Joi = require('joi');
// TODO: This is a placeholder
module.exports = (server) => {
server.route({
method: 'GET',
path: '/events',
config: {
description: 'Returns events.',
notes: 'Notes go here',
tags: ['events'],
validate: {
query: {
limit: Joi.number().integer().min(1).max(2000).default(100),
offset: Joi.number().integer().min(0).default(0),
view: Joi.string().valid('count'),
},
},
response: {
schema: Joi.array(),
},
},
handler: (request, reply) => {
reply('[]');
},
});
}

View file

@ -0,0 +1,27 @@
const Joi = require('joi');
// TODO: This is a placeholder
module.exports = (server) => {
server.route({
method: 'GET',
path: '/metadata',
config: {
description: 'Returns metadata.',
notes: 'Notes go here',
tags: ['metadata'],
validate: {
query: {
limit: Joi.number().integer().min(1).max(2000).default(100),
offset: Joi.number().integer().min(0).default(0),
view: Joi.string().valid('count'),
},
},
response: {
schema: Joi.array(),
},
},
handler: (request, reply) => {
reply('[]');
},
});
}