mirror of
https://github.com/cderche/greenlock-challenge-s3
synced 2025-05-10 23:46:31 +00:00
log challengeKey
This commit is contained in:
parent
d89a1c8b2a
commit
d95a4bb6a9
@ -1,5 +1,7 @@
|
|||||||
module.exports.get = (opts, options, s3) => {
|
module.exports.get = (opts, options, s3) => {
|
||||||
let challengeKey = options.directory + opts.challenge.token;
|
let challengeKey = path.join(options.directory, opts.challenge.token);
|
||||||
|
console.log('get', challengeKey);
|
||||||
|
|
||||||
return s3.getObject({ Key: challengeKey, Bucket: options.bucketName }).promise().then(function (data) {
|
return s3.getObject({ Key: challengeKey, Bucket: options.bucketName }).promise().then(function (data) {
|
||||||
console.log('Successfully retrieved challenge.' + data.Body.toString());
|
console.log('Successfully retrieved challenge.' + data.Body.toString());
|
||||||
return {
|
return {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
module.exports.remove = (opts, options, s3) => {
|
module.exports.remove = (opts, options, s3) => {
|
||||||
challengeKey = options.directory + opts.challenge.token;
|
let challengeKey = path.join(options.directory, opts.challenge.token);
|
||||||
|
console.log('remove', challengeKey);
|
||||||
|
|
||||||
return s3.deleteObject({ Key: challengeKey, Bucket: options.bucketName }).promise().then(function (data) {
|
return s3.deleteObject({ Key: challengeKey, Bucket: options.bucketName }).promise().then(function (data) {
|
||||||
console.log('Successfully deleted challenge.');
|
console.log('Successfully deleted challenge.');
|
||||||
return data;
|
return data;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
module.exports.set = (opts, options, s3) => {
|
module.exports.set = (opts, options, s3) => {
|
||||||
var challengeKey = path.join(options.directory, opts.challenge.token);
|
let challengeKey = path.join(options.directory, opts.challenge.token);
|
||||||
console.log(challengeKey);
|
console.log('set', challengeKey);
|
||||||
|
|
||||||
return s3.putObject({ Key: challengeKey, Body: opts.challenge.keyAuthorization, Bucket: options.bucketName }).promise().then(function (data) {
|
return s3.putObject({ Key: challengeKey, Body: opts.challenge.keyAuthorization, Bucket: options.bucketName }).promise().then(function (data) {
|
||||||
console.log('Successfully created challenge.');
|
console.log('Successfully created challenge.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user