dmp-dynamo_adapter 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dmp/dynamo_adapter.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9418816d26847581bce0424f326d1b7d65947b2aa3df952c2d8904984229b18c
|
4
|
+
data.tar.gz: 3e7a9d4819f987dc3ae51a699b88321182d28705d776e48780aedba1d5995412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9abe8d680a8dce95cf71d50e14b8fc9c954bb04bdaaa3d080b80dbb639b4f098c7c5b976610a7bff5a37c7ed48c68f330b4e315df93663ec48ffb3a5d2a39119
|
7
|
+
data.tar.gz: 1378240d137ae3afd8e089d0337d2322d8a8406fc93d3027b14870c6a2a0f0c15087b7b06bd5dd5f158ef93996e21103f0c4488cf4eae77d6cf3607cc8159931
|
data/lib/dmp/dynamo_adapter.rb
CHANGED
@@ -70,9 +70,12 @@ p "FINDING BY PK: PK - #{p_key.inspect} / SK - #{s_key.inspect}"
|
|
70
70
|
return_consumed_capacity: @debug_mode ? 'TOTAL' : 'NONE'
|
71
71
|
}
|
72
72
|
)
|
73
|
-
return { status: 404, error: MSG_NOT_FOUND } if response.items.empty?
|
74
73
|
|
75
|
-
|
74
|
+
pp response.data
|
75
|
+
|
76
|
+
return { status: 404, error: MSG_NOT_FOUND } if response[:item].nil?
|
77
|
+
|
78
|
+
{ status: 200, items: [response[:item]] }
|
76
79
|
rescue Aws::Errors::ServiceError => e
|
77
80
|
{ status: 500, error: "#{MSG_DEFAULT} - #{e.message}" }
|
78
81
|
end
|