1
0
Fork 0

Remove unused Aardvark foxxTemplates.js

This commit is contained in:
Alan Plum 2016-04-14 13:54:53 +02:00
parent 46822f2335
commit b4f99a3953
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
2 changed files with 0 additions and 59 deletions

View File

@ -1,58 +0,0 @@
'use strict';
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2010-2014 triAGENS GmbH, Cologne, Germany
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
///
/// @author Michael Hackstein
/// @author Alan Plum
////////////////////////////////////////////////////////////////////////////////
const joi = require('joi');
const httperr = require('http-errors');
const internal = require('internal');
const FoxxManager = require('@arangodb/foxx/manager');
const createRouter = require('@arangodb/foxx/router');
const router = createRouter();
module.exports = router;
router.use((req, res, next) => {
if (!internal.options()['server.disable-authentication'] && !req.session.uid) {
throw new httperr.Unauthorized();
}
next();
});
router.get('/devMode', (req, res) => res.json(false));
router.post('/generate', (req, res) => res.json(
FoxxManager.install('EMPTY', '/todo', req.body)
))
.body(joi.object({
applicationContext: joi.string().optional(),
path: joi.string().optional(),
name: joi.string().required(),
collectionNames: joi.array().required(),
authenticated: joi.boolean().required(),
author: joi.string().required(),
description: joi.string().required(),
license: joi.string().required()
}), 'The configuration for the template.');

View File

@ -41,4 +41,3 @@ module.context.use(require('./aardvark'));
module.context.use('/foxxes', require('./foxxes'));
module.context.use('/cluster', require('./cluster'));
module.context.use('/statistics', require('./statistics'));
module.context.use('/templates', require('./foxxTemplates'));