trilium/routes/routes.js

58 lines
2.2 KiB
JavaScript
Raw Normal View History

2017-11-04 11:00:35 +08:00
const indexRoute = require('./index');
const loginRoute = require('./login');
const logoutRoute = require('./logout');
const migrationRoute = require('./migration');
2017-12-04 11:29:23 +08:00
const setupRoute = require('./setup');
2017-11-04 11:00:35 +08:00
// API routes
const treeApiRoute = require('./api/tree');
const notesApiRoute = require('./api/notes');
const notesMoveApiRoute = require('./api/notes_move');
const noteHistoryApiRoute = require('./api/note_history');
const recentChangesApiRoute = require('./api/recent_changes');
const settingsApiRoute = require('./api/settings');
const passwordApiRoute = require('./api/password');
const migrationApiRoute = require('./api/migration');
const syncApiRoute = require('./api/sync');
const loginApiRoute = require('./api/login');
const eventLogRoute = require('./api/event_log');
2017-11-05 11:46:50 +08:00
const recentNotesRoute = require('./api/recent_notes');
2017-11-21 13:25:53 +08:00
const appInfoRoute = require('./api/app_info');
2017-12-03 10:48:22 +08:00
const exportRoute = require('./api/export');
2017-12-03 12:41:18 +08:00
const importRoute = require('./api/import');
2017-12-04 11:29:23 +08:00
const setupApiRoute = require('./api/setup');
2017-12-15 09:38:56 +08:00
const sqlRoute = require('./api/sql');
2017-12-16 13:05:37 +08:00
const anonymizationRoute = require('./api/anonymization');
const cleanupRoute = require('./api/cleanup');
2017-11-04 11:00:35 +08:00
function register(app) {
app.use('/', indexRoute);
app.use('/login', loginRoute);
app.use('/logout', logoutRoute);
app.use('/migration', migrationRoute);
2017-12-04 11:29:23 +08:00
app.use('/setup', setupRoute);
2017-11-04 11:00:35 +08:00
app.use('/api/tree', treeApiRoute);
app.use('/api/notes', notesApiRoute);
app.use('/api/notes', notesMoveApiRoute);
app.use('/api/notes-history', noteHistoryApiRoute);
app.use('/api/recent-changes', recentChangesApiRoute);
app.use('/api/settings', settingsApiRoute);
app.use('/api/password', passwordApiRoute);
app.use('/api/migration', migrationApiRoute);
app.use('/api/sync', syncApiRoute);
app.use('/api/login', loginApiRoute);
app.use('/api/event-log', eventLogRoute);
2017-11-05 11:46:50 +08:00
app.use('/api/recent-notes', recentNotesRoute);
2017-11-21 13:25:53 +08:00
app.use('/api/app-info', appInfoRoute);
2017-12-03 10:48:22 +08:00
app.use('/api/export', exportRoute);
2017-12-03 12:41:18 +08:00
app.use('/api/import', importRoute);
2017-12-04 11:29:23 +08:00
app.use('/api/setup', setupApiRoute);
2017-12-15 09:38:56 +08:00
app.use('/api/sql', sqlRoute);
2017-12-16 13:05:37 +08:00
app.use('/api/anonymization', anonymizationRoute);
app.use('/api/cleanup', cleanupRoute);
2017-11-04 11:00:35 +08:00
}
module.exports = {
register
};