mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #21394 from overleaf/msm-esm-user-activation
[web] Migrate `modules/user-activate` to ESM GitOrigin-RevId: e5ab3e9c53ea2d3f4ddfbc2200a889b8bb0db83c
This commit is contained in:
+8
-5
@@ -1,9 +1,12 @@
|
||||
const Path = require('path')
|
||||
const UserGetter = require('../../../../app/src/Features/User/UserGetter')
|
||||
const UserRegistrationHandler = require('../../../../app/src/Features/User/UserRegistrationHandler')
|
||||
const ErrorController = require('../../../../app/src/Features/Errors/ErrorController')
|
||||
import Path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import UserGetter from '../../../../app/src/Features/User/UserGetter.js'
|
||||
import UserRegistrationHandler from '../../../../app/src/Features/User/UserRegistrationHandler.js'
|
||||
import ErrorController from '../../../../app/src/Features/Errors/ErrorController.js'
|
||||
|
||||
module.exports = {
|
||||
const __dirname = Path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
export default {
|
||||
registerNewUser(req, res, next) {
|
||||
res.render(Path.resolve(__dirname, '../views/user/register'))
|
||||
},
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
const logger = require('@overleaf/logger')
|
||||
const UserActivateController = require('./UserActivateController')
|
||||
const AuthenticationController = require('../../../../app/src/Features/Authentication/AuthenticationController')
|
||||
const AuthorizationMiddleware = require('../../../../app/src/Features/Authorization/AuthorizationMiddleware')
|
||||
import logger from '@overleaf/logger'
|
||||
import UserActivateController from './UserActivateController.mjs'
|
||||
import AuthenticationController from '../../../../app/src/Features/Authentication/AuthenticationController.js'
|
||||
import AuthorizationMiddleware from '../../../../app/src/Features/Authorization/AuthorizationMiddleware.js'
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
apply(webRouter) {
|
||||
logger.debug({}, 'Init UserActivate router')
|
||||
|
||||
Reference in New Issue
Block a user