Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding ADMIN_PASSWORD env var #50

Closed
wants to merge 1 commit into from
Closed

adding ADMIN_PASSWORD env var #50

wants to merge 1 commit into from

Conversation

wileyj
Copy link
Contributor

@wileyj wileyj commented Apr 9, 2021

Description

Adds a new env var ADMIN_PASSWORD so it doesn't have to be hard-coded in the config file as adminPassword: xxxxx

For details refer to issue #47

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other

@wileyj wileyj requested a review from hstove April 9, 2021 14:31
@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #50 (0b091b1) into master (20bd63d) will decrease coverage by 0.26%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   58.37%   58.10%   -0.27%     
==========================================
  Files           8        8              
  Lines         663      666       +3     
==========================================
  Hits          387      387              
- Misses        276      279       +3     
Impacted Files Coverage Δ
src/config.js 0.00% <0.00%> (ø)
src/developmode.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20bd63d...0b091b1. Read the comment docs.

@@ -89,7 +89,9 @@ export function getConfig() {
if (process.env.BSK_SUBDOMAIN_OWNER_KEY) {
config.ownerKey = process.env.BSK_SUBDOMAIN_OWNER_KEY
}

if (process.env.ADMIN_PASSWORD) {
config.ownerKey = process.env.ADMIN_PASSWORD || configDevelopDefaults.ADMIN_PASSWORD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configDevelopDefaults.ADMIN_PASSWORD is not defined

Suggested change
config.ownerKey = process.env.ADMIN_PASSWORD || configDevelopDefaults.ADMIN_PASSWORD
config.ownerKey = process.env.ADMIN_PASSWORD || ADMIN_PASSWORD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, configDevelopDefaults is a variable defined up above in this same file: https://github.com/blockstack/subdomain-registrar/blob/0b091b1f521af8f540960a4f74b915bfaa71c88b/src/config.js#L5

@wileyj wileyj closed this Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants