Skip to content

Commit

Permalink
Merge pull request #246 from Scalingo/fix/hdsContactsExport
Browse files Browse the repository at this point in the history
fix: export HDSContact and its update method
  • Loading branch information
Anouchka-M authored Jul 12, 2022
2 parents d4103f6 + f707beb commit 4e4af23
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/HDSContacts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class HDSContacts {
* @see https://developers.scalingo.com/hds_contacts
* @param appId
*/
updateHDSContact(appId: string, params: UpdateParams): Promise<HDSContact> {
update(appId: string, params: UpdateParams): Promise<HDSContact> {
return unpackData(
this._client.apiClient().put(`/apps/${appId}/hds_contact`, {
hds_contact: params,
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Deployments from "./Deployments";
import Domains from "./Domains";
import Environment from "./Environment";
import Events from "./Events";
import HDSContacts from "./HDSContacts";
import Keys from "./Keys";
import Logs from "./Logs";
import Metrics from "./Metrics";
Expand Down Expand Up @@ -97,6 +98,7 @@ export class Client {
Domains = new Domains(this);
Environment = new Environment(this);
Events = new Events(this);
HDSContacts = new HDSContacts(this);
Keys = new Keys(this);
Logs = new Logs(this);
Metrics = new Metrics(this);
Expand Down
1 change: 1 addition & 0 deletions src/models/regional/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from "./deployments";
export * from "./domains";
export * from "./environment";
export * from "./events";
export * from "./hds_contact";
export * from "./logs";
export * from "./metrics";
export * from "./notification_platforms";
Expand Down
4 changes: 2 additions & 2 deletions test/HDSContacts/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HDSContacts from "../../src/HDSContacts";
import { testPut } from "../utils/http";

describe("HDSContacts#updateHDSContact", () => {
describe("HDSContacts#update", () => {
testPut(
"https://api.osc-fr1.scalingo.com/v1/apps/test/hds_contact",
{
Expand All @@ -14,7 +14,7 @@ describe("HDSContacts#updateHDSContact", () => {
},
"hds_contact",
(client) => {
return new HDSContacts(client).updateHDSContact("test", {
return new HDSContacts(client).update("test", {
name: "Médecin",
phoneNumber: "0600000000",
addressLine1: "23 rue du bois",
Expand Down

0 comments on commit 4e4af23

Please sign in to comment.