index : worker-pastebin

A toy pastebin on Cloudflare Workers with E2EE, React frontend and S3-compatible storage backend

diff options
context:
space:
mode:
authorPeter Cai <[email protected]>2020-12-31 14:27:27 +0800
committerPeter Cai <[email protected]>2020-12-31 14:27:27 +0800
commitcb41215ec973c280810801d65524aee1472a2c3c (patch)
treeab005a579493b956922a1820ecc7b37a8a6747a2
parent5e0c86152403c894e960f67cfb06f87a72a8b48f (diff)
downloadworker-pastebin-cb41215ec973c280810801d65524aee1472a2c3c.tar.gz
aws: auth: fix date string formatting
* make sure it's always string
-rw-r--r--src/aws/auth.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/aws/auth.coffee b/src/aws/auth.coffee
index 40437d9..ec78935 100644
--- a/src/aws/auth.coffee
+++ b/src/aws/auth.coffee
@@ -112,8 +112,8 @@ class AwsAuth
@pad(@date.getUTCSeconds()) + "Z"
timeStampYYYYMMDD: ->
- @date.getUTCFullYear() +
- @pad(@date.getUTCMonth() + 1) +
- @pad(@date.getUTCDate())
+ "#{@date.getUTCFullYear()}" +
+ "#{@pad(@date.getUTCMonth() + 1)}" +
+ "#{@pad(@date.getUTCDate())}"
-export default AwsAuth \ No newline at end of file
+export default AwsAuth