Skip to content

Commit

Permalink
feature: createKeyword() improvements on feedback on error
Browse files Browse the repository at this point in the history
  • Loading branch information
fmancardi committed Jul 7, 2019
1 parent bd2e2bc commit 4a0d101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/api/rest/v2/tlRestApi.class.php
Expand Up @@ -786,10 +786,10 @@ public function createBuild() {
if( !$this->userHasRight($rightToCheck,TRUE,$context) ) {
$statusOK = false;
$msg = lang_get('API_INSUFFICIENT_RIGHTS');

$op['message'] =
sprintf($msg,$rightToCheck,$this->user->login,
$context['tproject_id'],$context['tplan_id']);
$this->app->status(403);
}
}

Expand All @@ -804,6 +804,7 @@ public function createBuild() {
$op['message'] =
sprintf($this->l10n['API_BUILDNAME_ALREADY_EXISTS'],
$build->name, $build->id);
$this->app->status(409);
}

$build->tplan_id = $context['tplan_id'];
Expand Down

0 comments on commit 4a0d101

Please sign in to comment.