mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Remove v1 defaults (#2391)
GitOrigin-RevId: e9812c9d7785ac64500dcd3925a6b5be4cb04d7c
This commit is contained in:
parent
475e6971a2
commit
11419845e8
3 changed files with 22 additions and 5 deletions
|
@ -15,10 +15,16 @@ httpAuthUsers[httpAuthUser] = httpAuthPass
|
||||||
|
|
||||||
sessionSecret = process.env['SESSION_SECRET'] or "secret-please-change"
|
sessionSecret = process.env['SESSION_SECRET'] or "secret-please-change"
|
||||||
|
|
||||||
v1Api =
|
if process.env['V1_API_URL'] or process.env['V1_HOST']
|
||||||
url: process.env['V1_API_URL'] or "http://#{process.env['V1_HOST'] or 'localhost'}:5000"
|
v1Api =
|
||||||
user: process.env['V1_API_USER'] or 'overleaf'
|
url: process.env['V1_API_URL'] or "http://#{process.env['V1_HOST']}:5000"
|
||||||
pass: process.env['V1_API_PASSWORD'] or 'password'
|
user: process.env['V1_API_USER']
|
||||||
|
pass: process.env['V1_API_PASSWORD']
|
||||||
|
else
|
||||||
|
v1Api =
|
||||||
|
url: undefined
|
||||||
|
user: undefined
|
||||||
|
pass: undefined
|
||||||
|
|
||||||
module.exports = settings =
|
module.exports = settings =
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
v1Api =
|
v1Api =
|
||||||
url: "http://#{process.env['V1_HOST'] or 'localhost'}:5000"
|
url: "http://localhost:5000"
|
||||||
|
user: 'overleaf'
|
||||||
|
pass: 'password'
|
||||||
|
|
||||||
module.exports =
|
module.exports =
|
||||||
enableSubscriptions: true
|
enableSubscriptions: true
|
||||||
|
|
||||||
apis:
|
apis:
|
||||||
|
v1:
|
||||||
|
url: v1Api.url
|
||||||
|
user: v1Api.user
|
||||||
|
pass: v1Api.pass
|
||||||
recurly:
|
recurly:
|
||||||
# Set up our own mock recurly server
|
# Set up our own mock recurly server
|
||||||
url: 'http://localhost:6034'
|
url: 'http://localhost:6034'
|
||||||
|
|
|
@ -19,6 +19,10 @@ describe('AnalyticsController', function() {
|
||||||
getInstitutionLicences: sinon.stub().callsArgWith(4)
|
getInstitutionLicences: sinon.stub().callsArgWith(4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.Features = {
|
||||||
|
hasFeature: sinon.stub().returns(true)
|
||||||
|
}
|
||||||
|
|
||||||
this.controller = SandboxedModule.require(modulePath, {
|
this.controller = SandboxedModule.require(modulePath, {
|
||||||
globals: {
|
globals: {
|
||||||
console: console
|
console: console
|
||||||
|
@ -28,6 +32,7 @@ describe('AnalyticsController', function() {
|
||||||
'../Authentication/AuthenticationController': this
|
'../Authentication/AuthenticationController': this
|
||||||
.AuthenticationController,
|
.AuthenticationController,
|
||||||
'../Institutions/InstitutionsAPI': this.InstitutionsAPI,
|
'../Institutions/InstitutionsAPI': this.InstitutionsAPI,
|
||||||
|
'../../infrastructure/Features': this.Features,
|
||||||
'logger-sharelatex': {
|
'logger-sharelatex': {
|
||||||
log() {}
|
log() {}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue