..
Showing
1 changed file
with
4 additions
and
4 deletions
| ... | @@ -24,14 +24,14 @@ class SongController extends Controller | ... | @@ -24,14 +24,14 @@ class SongController extends Controller | 
| 24 | return Response::successWithCode(ErrorCode::MISSING_PARAMS, ErrorCode::$messages[ErrorCode::MISSING_PARAMS]); | 24 | return Response::successWithCode(ErrorCode::MISSING_PARAMS, ErrorCode::$messages[ErrorCode::MISSING_PARAMS]); | 
| 25 | } | 25 | } | 
| 26 | 26 | ||
| 27 | if (!$request->filled('type') || !$request->filled('value')) { | ||
| 28 | return Response::successWithCode(ErrorCode::EMPTY_PARAMS, ErrorCode::$messages[ErrorCode::EMPTY_PARAMS]); | ||
| 29 | } | ||
| 30 | |||
| 31 | if (!in_array($request->get('type'), static::$input_types)) { | 27 | if (!in_array($request->get('type'), static::$input_types)) { | 
| 32 | return Response::successWithCode(ErrorCode::ILLEGAL_PARAMS, ErrorCode::$messages[ErrorCode::ILLEGAL_PARAMS]); | 28 | return Response::successWithCode(ErrorCode::ILLEGAL_PARAMS, ErrorCode::$messages[ErrorCode::ILLEGAL_PARAMS]); | 
| 33 | }*/ | 29 | }*/ | 
| 34 | 30 | ||
| 31 | if (!$request->filled('song_id') || !$request->filled('song_name') || !$request->filled('singer')) { | ||
| 32 | return Response::successWithCode(ErrorCode::EMPTY_PARAMS, ErrorCode::$messages[ErrorCode::EMPTY_PARAMS]); | ||
| 33 | } | ||
| 34 | |||
| 35 | $songs = Song::with('subject', 'tags', 'files') | 35 | $songs = Song::with('subject', 'tags', 'files') | 
| 36 | ->where([ | 36 | ->where([ | 
| 37 | 'lyrics_right' => 1, | 37 | 'lyrics_right' => 1, | ... | ... | 
- 
Please register or sign in to post a comment
