Skip to content

Commit

Permalink
fix(backups#restore): Unpack response from backups#restore properly
Browse files Browse the repository at this point in the history
fix #44
  • Loading branch information
aurelien-reeves-scalingo committed Jan 3, 2023
1 parent 8ccdb86 commit 73fc7a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/scalingo/regional_database/backups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def create(addon_id, headers = nil, &block)
&block
)

unpack { response }
unpack (:database_backup) { response }
end

def for(addon_id, headers = nil, &block)
Expand Down
16 changes: 9 additions & 7 deletions samples/regional_database/backups/create-201.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
"Referrer-Policy": "strict-origin-when-cross-origin"
},
"json_body": {
"id": "5b8b36104ffb090be1ac3ce1",
"created_at": "2019-07-18T03:00:00.178+02:00",
"name": "20180902010000_kibana-3938",
"size": 0,
"status": "pending",
"database_id": "597601234ffb097af4f3099b",
"type": "postgresql"
"database_backup": {
"id": "5b8b36104ffb090be1ac3ce1",
"created_at": "2019-07-18T03:00:00.178+02:00",
"name": "20180902010000_kibana-3938",
"size": 0,
"status": "pending",
"database_id": "597601234ffb097af4f3099b",
"type": "postgresql"
}
}
}
}

0 comments on commit 73fc7a7

Please sign in to comment.