mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix the paths in grunt tasks (#643)
This commit is contained in:
parent
66c8f0a14c
commit
431aa43b63
1 changed files with 7 additions and 7 deletions
|
@ -5,12 +5,12 @@ module.exports = (grunt) ->
|
||||||
done = @async()
|
done = @async()
|
||||||
email = grunt.option("email")
|
email = grunt.option("email")
|
||||||
if !email?
|
if !email?
|
||||||
console.error "Usage: grunt user:create-admin --email joe@example.com"
|
console.error "Usage: grunt user:create-admin --email=joe@example.com"
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
|
||||||
settings = require "settings-sharelatex"
|
settings = require "settings-sharelatex"
|
||||||
UserRegistrationHandler = require "../web/app/js/Features/User/UserRegistrationHandler"
|
UserRegistrationHandler = require "../web/app/src/Features/User/UserRegistrationHandler"
|
||||||
OneTimeTokenHandler = require "../web/app/js/Features/Security/OneTimeTokenHandler"
|
OneTimeTokenHandler = require "../web/app/src/Features/Security/OneTimeTokenHandler"
|
||||||
UserRegistrationHandler.registerNewUser {
|
UserRegistrationHandler.registerNewUser {
|
||||||
email: email
|
email: email
|
||||||
password: require("crypto").randomBytes(32).toString("hex")
|
password: require("crypto").randomBytes(32).toString("hex")
|
||||||
|
@ -39,11 +39,11 @@ module.exports = (grunt) ->
|
||||||
done = @async()
|
done = @async()
|
||||||
email = grunt.option("email")
|
email = grunt.option("email")
|
||||||
if !email?
|
if !email?
|
||||||
console.error "Usage: grunt user:delete --email joe@example.com"
|
console.error "Usage: grunt user:delete --email=joe@example.com"
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
settings = require "settings-sharelatex"
|
settings = require "settings-sharelatex"
|
||||||
UserGetter = require "../web/app/js/Features/User/UserGetter"
|
UserGetter = require "../web/app/src/Features/User/UserGetter"
|
||||||
UserDeleter = require "../web/app/js/Features/User/UserDeleter"
|
UserDeleter = require "../web/app/src/Features/User/UserDeleter"
|
||||||
UserGetter.getUser email:email, (error, user) ->
|
UserGetter.getUser email:email, (error, user) ->
|
||||||
if error?
|
if error?
|
||||||
throw error
|
throw error
|
||||||
|
@ -53,4 +53,4 @@ module.exports = (grunt) ->
|
||||||
UserDeleter.deleteUser user._id, (err)->
|
UserDeleter.deleteUser user._id, (err)->
|
||||||
if err?
|
if err?
|
||||||
throw err
|
throw err
|
||||||
done()
|
done()
|
||||||
|
|
Loading…
Reference in a new issue