Skip to content

Commit

Permalink
qr-share: use default credentials plus global app
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Odeke committed Oct 31, 2015
1 parent d7c9ae9 commit dc7934a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/drive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ type qrLinkCmd struct {
}

func (cmd *qrLinkCmd) Flags(fs *flag.FlagSet) *flag.FlagSet {
cmd.Address = fs.String(drive.AddressKey, "http://localhost:3000", "address on which the QR code generator is running")
cmd.Address = fs.String(drive.AddressKey, drive.DefaultQRShareServer, "address on which the QR code generator is running")
cmd.ById = fs.Bool(drive.CLIOptionId, false, "share by id instead of path")
cmd.Verbose = fs.Bool(drive.CLIOptionVerboseKey, true, drive.DescVerbose)
return fs
Expand Down
12 changes: 11 additions & 1 deletion src/qr-share.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ var envKeyAlias = &extractor.EnvKey{
PrivKeyAlias: "DRIVE_SERVER_PRIV_KEY",
}

const (
DefaultQRShareServer = "https://qr-server.herokuapp.com/drive"
)

var envKeySet = extractor.KeySetFromEnv(envKeyAlias)

func (g *Commands) QR(byId bool) error {

kvChan := g.urler(byId, g.opts.Sources)

address := "http://localhost:3000"
address := DefaultQRShareServer
if g.opts.Meta != nil {
meta := *(g.opts.Meta)
if retrAddress, ok := meta[AddressKey]; ok && len(retrAddress) >= 1 {
Expand All @@ -45,6 +49,12 @@ func (g *Commands) QR(byId bool) error {
}

address = strings.TrimRight(address, "/")
if envKeySet.PublicKey == "" {
envKeySet.PublicKey = "5160897b3586461e83e7279c10352ac4"
}
if envKeySet.PrivateKey == "" {
envKeySet.PrivateKey = "5a3451dadab74f75b16f754c0a931949"
}

for kv := range kvChan {
switch kv.value.(type) {
Expand Down

3 comments on commit dc7934a

@odeke-em
Copy link
Owner

Choose a reason for hiding this comment

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

Hey @shaggytwodope, please refresh your releases :)

@professorjamesmoriarty

Choose a reason for hiding this comment

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

AUR done, PPA wil take a few minutes. Expect complete in about 20 minutes.

@professorjamesmoriarty

Choose a reason for hiding this comment

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

@odeke-em updating still, ppa takes time to build.. I'll make sure they are done within the hour (gonna make some candy apples lol) but updated ppa stats as well if you get bored or curious http://shaggytwodope.xyz/drivestats/drive.html

Please sign in to comment.