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

Commit 4048892

Browse files
committed
feat(respons): change respons type
1 parent 82c7c68 commit 4048892

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Controllers/NumberController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function new_password(): void
1818
$validator->validate();
1919
$errors = $validator->errors();
2020
if ($errors){
21-
Flight::json($this->fail(["errors" => $errors]));
21+
Flight::json($this->fail2(["errors" => $errors]));
2222
}else {
2323
$number = Number::where('number', $request["number"]);
2424
if (!$number) {
@@ -28,11 +28,11 @@ public function new_password(): void
2828
$stmt->execute([
2929
':number' => $request['number'],
3030
]);
31-
Flight::json($this->success([
31+
Flight::json($this->success2([
3232
'message' => ['شماره تلفن با موفقیت ثبت شد.'],
3333
]));
3434
} else {
35-
Flight::json($this->fail([
35+
Flight::json($this->fail2([
3636
'message' => ['شماره از قبل وجود دارد.'],
3737
]));
3838
}

0 commit comments

Comments
 (0)