strapi/controllers/SettingsManager.js

22 lines
391 B
JavaScript
Raw Normal View History

2016-08-26 14:07:57 +02:00
'use strict';
2016-08-31 12:24:16 +02:00
const sendfile = require('koa-sendfile');
const path = require('path');
2016-08-26 14:07:57 +02:00
/**
* A set of functions called "actions" for `SettingsManager`
*/
module.exports = {
find: function *() {
this.body = [];
2016-08-31 12:24:16 +02:00
},
file: function *() {
yield sendfile(this, path.resolve(__dirname, '..', 'public', 'build', this.params.file));
if (!this.status) this.throw(404);
2016-08-26 14:07:57 +02:00
}
};