Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
feat(respons): change respons type
Browse files Browse the repository at this point in the history
  • Loading branch information
tikrack committed Sep 9, 2024
1 parent 82c7c68 commit 4048892
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Controllers/NumberController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function new_password(): void
$validator->validate();
$errors = $validator->errors();
if ($errors){
Flight::json($this->fail(["errors" => $errors]));
Flight::json($this->fail2(["errors" => $errors]));
}else {
$number = Number::where('number', $request["number"]);
if (!$number) {
Expand All @@ -28,11 +28,11 @@ public function new_password(): void
$stmt->execute([
':number' => $request['number'],
]);
Flight::json($this->success([
Flight::json($this->success2([
'message' => ['شماره تلفن با موفقیت ثبت شد.'],
]));
} else {
Flight::json($this->fail([
Flight::json($this->fail2([
'message' => ['شماره از قبل وجود دارد.'],
]));
}
Expand Down

0 comments on commit 4048892

Please sign in to comment.