mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
28 lines
728 B
JavaScript
28 lines
728 B
JavaScript
import AuthenticationController from '../../../../app/src/Features/Authentication/AuthenticationController.mjs'
|
|
import ZoteroController from './ZoteroController.mjs'
|
|
|
|
export default {
|
|
apply(webRouter) {
|
|
// Get Zotero groups for the create-file modal
|
|
webRouter.get(
|
|
'/zotero/groups',
|
|
AuthenticationController.requireLogin(),
|
|
ZoteroController.getGroups
|
|
)
|
|
|
|
// Link Zotero account (a user submits an API key)
|
|
webRouter.post(
|
|
'/zotero/link',
|
|
AuthenticationController.requireLogin(),
|
|
ZoteroController.link
|
|
)
|
|
|
|
// Unlink Zotero account
|
|
webRouter.post(
|
|
'/zotero/unlink',
|
|
AuthenticationController.requireLogin(),
|
|
ZoteroController.unlink
|
|
)
|
|
},
|
|
}
|