Browse Source

add response parameter

pull/1/head
wahyuun 9 months ago
parent
commit
a0f124f330
  1. 2
      app/Http/Controllers/HumanResourceController.php
  2. 2
      app/Http/Controllers/RefferalCodeController.php

2
app/Http/Controllers/HumanResourceController.php

@ -168,7 +168,7 @@ class HumanResourceController extends Controller
} }
if ($result) { if ($result) {
return response()->json(['status' => 'success', 'message' => 'Human Resource Pool successfully updated!', 'code' => 200], 200); return response()->json(['status' => 'success', 'data' => $result, 'message' => 'Human Resource Pool successfully updated!', 'code' => 200], 200);
} else { } else {
return response()->json(['status' => 'failed', 'message' => 'Human Resource Pool failed updated!', 'code' => 400], 400); return response()->json(['status' => 'failed', 'message' => 'Human Resource Pool failed updated!', 'code' => 400], 400);
} }

2
app/Http/Controllers/RefferalCodeController.php

@ -23,7 +23,7 @@ class RefferalCodeController extends Controller
$result = RefferalCode::create($data); $result = RefferalCode::create($data);
if($result){ if($result){
return response()->json(['status'=>'success','message'=>'Add refferal code successfully!','code'=>200], 200); return response()->json(['status'=>'success', 'data'=> $result, 'message'=>'Add refferal code successfully!','code'=>200], 200);
}else{ }else{
return response()->json(['status'=>'failed','message'=>'Add refferal Code failed!','code'=>400], 400); return response()->json(['status'=>'failed','message'=>'Add refferal Code failed!','code'=>400], 400);
} }

Loading…
Cancel
Save