Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.1 #13

Merged
merged 4 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ All notable changes to `powerdns-php` will be documented in this file.
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## Unreleased
[Compare v1.0.0 - Unreleased](https://github.com/exonet/powerdns-php/compare/v1.0.0...develop)
[Compare v1.0.1 - Unreleased](https://github.com/exonet/powerdns-php/compare/v1.0.1...develop)

## [v1.0.1](https://github.com/exonet/powerdns-php/releases/tag/v1.0.1) - 2019-07-17
[Compare v1.0.0 - v1.0.1](https://github.com/exonet/powerdns-php/compare/v1.0.0...v1.0.1)
### Changed
- The `Content-Type` header is now also set when making calls to the API. ([#11](https://github.com/exonet/powerdns-php/issues/11))

### Fixed
- Changed the payload key from `set_ptr` to the correct `set-ptr` in the RRSetTransformer. ([#12](https://github.com/exonet/powerdns-php/issues/12))

## [v1.0.0](https://github.com/exonet/powerdns-php/releases/tag/v1.0.0) - 2019-07-05
[Compare v0.2.4 - v1.0.0](https://github.com/exonet/powerdns-php/compare/v0.2.4...v1.0.0)
Expand Down
5 changes: 4 additions & 1 deletion src/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ private function parseResponse(PsrResponse $response) : array
break;
}

throw new PowerdnsException($contents['error']);
$error = isset($contents['error']) ? $contents['error'] : $contents;

throw new PowerdnsException($error);
}

/**
Expand Down Expand Up @@ -189,6 +191,7 @@ private function getDefaultHeaders() : array
return [
'X-API-Key' => $this->powerdns->getConfig()['apiKey'],
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'User-Agent' => 'exonet-powerdns-php/'.Powerdns::CLIENT_VERSION,
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Powerdns.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Powerdns
/**
* The version of this package. This is being used for the user-agent header.
*/
public const CLIENT_VERSION = 'v1.0.0';
public const CLIENT_VERSION = 'v1.0.1';

/**
* @var Powerdns The client instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/RRSetTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private function transformRecord(Record $record)
{
return (object) [
'content' => $record->getContent(),
'set_ptr' => $record->isSetPtr(),
'set-ptr' => $record->isSetPtr(),
'disabled' => $record->isDisabled(),
];
}
Expand Down