mirror of https://gitee.com/bigwinds/arangodb
applicationContext.foxxFilename -> applicationContext.fileName
This commit is contained in:
parent
8b05198e17
commit
b61d08efce
|
@ -132,7 +132,7 @@ controller.allRoutes
|
|||
|
||||
controller.apiDocumentation('/api', {
|
||||
swaggerJson(req, res) {
|
||||
var filename = applicationContext.foxxFilename('api-docs.json');
|
||||
var filename = applicationContext.fileName('api-docs.json');
|
||||
res.sendFile(filename, {lastModified: true});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -382,7 +382,7 @@ function BaseMiddleware() {
|
|||
///
|
||||
/// ```js
|
||||
/// response.sendFile('/tmp/results.json');
|
||||
/// response.sendFile(applicationContext.foxxFilename('image.png'), { lastModified: true });
|
||||
/// response.sendFile(applicationContext.fileName('image.png'), { lastModified: true });
|
||||
/// ```
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -25,10 +25,18 @@ class AppContext {
|
|||
});
|
||||
}
|
||||
|
||||
foxxFilename(filename) {
|
||||
fileName(filename) {
|
||||
return fs.safeJoin(this._prefix, filename);
|
||||
}
|
||||
|
||||
file(filename, encoding) {
|
||||
return fs.readFileSync(this.fileName(filename), encoding);
|
||||
}
|
||||
|
||||
foxxFilename(filename) {
|
||||
return this.fileName(filename);
|
||||
}
|
||||
|
||||
path(name) {
|
||||
return path.join(this._prefix, name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue