@@ -28,7 +28,7 @@ public function _list(Request $request): Response
2828 {
2929 $ table = $ request ->getPathSegment (2 );
3030 $ params = $ request ->getParams ();
31- if (!$ this ->service ->exists ($ table )) {
31+ if (!$ this ->service ->hasTable ($ table )) {
3232 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
3333 }
3434 return $ this ->responder ->success ($ this ->service ->_list ($ table , $ params ));
@@ -39,7 +39,7 @@ public function read(Request $request): Response
3939 $ table = $ request ->getPathSegment (2 );
4040 $ id = $ request ->getPathSegment (3 );
4141 $ params = $ request ->getParams ();
42- if (!$ this ->service ->exists ($ table )) {
42+ if (!$ this ->service ->hasTable ($ table )) {
4343 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
4444 }
4545 if (strpos ($ id , ', ' ) !== false ) {
@@ -66,7 +66,7 @@ public function create(Request $request): Response
6666 return $ this ->responder ->error (ErrorCode::HTTP_MESSAGE_NOT_READABLE , '' );
6767 }
6868 $ params = $ request ->getParams ();
69- if (!$ this ->service ->exists ($ table )) {
69+ if (!$ this ->service ->hasTable ($ table )) {
7070 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
7171 }
7272 if (is_array ($ record )) {
@@ -89,7 +89,7 @@ public function update(Request $request): Response
8989 return $ this ->responder ->error (ErrorCode::HTTP_MESSAGE_NOT_READABLE , '' );
9090 }
9191 $ params = $ request ->getParams ();
92- if (!$ this ->service ->exists ($ table )) {
92+ if (!$ this ->service ->hasTable ($ table )) {
9393 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
9494 }
9595 $ ids = explode (', ' , $ id );
@@ -115,7 +115,7 @@ public function delete(Request $request): Response
115115 $ table = $ request ->getPathSegment (2 );
116116 $ id = $ request ->getPathSegment (3 );
117117 $ params = $ request ->getParams ();
118- if (!$ this ->service ->exists ($ table )) {
118+ if (!$ this ->service ->hasTable ($ table )) {
119119 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
120120 }
121121 $ ids = explode (', ' , $ id );
@@ -139,7 +139,7 @@ public function increment(Request $request): Response
139139 return $ this ->responder ->error (ErrorCode::HTTP_MESSAGE_NOT_READABLE , '' );
140140 }
141141 $ params = $ request ->getParams ();
142- if (!$ this ->service ->exists ($ table )) {
142+ if (!$ this ->service ->hasTable ($ table )) {
143143 return $ this ->responder ->error (ErrorCode::TABLE_NOT_FOUND , $ table );
144144 }
145145 $ ids = explode (', ' , $ id );
0 commit comments