Skip to content

Commit

Permalink
Fix get latest revision (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
luthfianto authored Dec 31, 2018
1 parent 6a2ac32 commit 99cad43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
7 changes: 5 additions & 2 deletions components/bots/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,11 @@ export default class Bot extends Component {
// get bot latestRevision
// TODO: find a better way to get the latest bot revision
try {
const { response: {body: data} } = await this.helper.toPromise(this.api.botApi,
this.api.botApi.projectsProjectIdBotGet, projectId);
const { response: { body: data } } = await this.helper.toPromise(
this.api.projectApi,
this.api.projectApi.projectsProjectIdBotGet, projectId
);

if (data.revision) {
latestBotRevision = data.revision;
}
Expand Down
7 changes: 5 additions & 2 deletions components/bots/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ export default class Deployment {
let cmsRevision: string;

try {
const { response: {body: data} } = await this.helper.toPromise(this.api.botApi,
this.api.botApi.projectsProjectIdBotGet, projectId);
const { response: { body: data } } = await this.helper.toPromise(
this.api.projectApi,
this.api.projectApi.projectsProjectIdBotGet, projectId
);

if (data.revision) {
botRevision = data.revision;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/components/bots/bot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/components/bots/deployment.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 99cad43

Please sign in to comment.