Materials API bug fixing
Change-Id: Ie81274936c7cb02746230d6c5f749ebe0e31dedb
This commit is contained in:
parent
8691057059
commit
908e24edf1
|
@ -691,7 +691,7 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController
|
|||
|
||||
if ($validation->fails()) {
|
||||
$ex = new ValidationException;
|
||||
$ex->setMessages($validation->messages()->toArray());
|
||||
$ex->setMessages($validation->messaupdateSlideges()->toArray());
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,6 @@ final class OAuth2PresentationApiController extends OAuth2ProtectedController
|
|||
'featured' => 'sometimes|required|boolean',
|
||||
];
|
||||
|
||||
$data = $data->all();
|
||||
// Creates a Validator instance and validates the data.
|
||||
$validation = Validator::make($data, $rules);
|
||||
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
*/
|
||||
final class PresentationVideoSerializer extends PresentationMaterialSerializer
|
||||
{
|
||||
protected static $array_mappings = array
|
||||
(
|
||||
'YouTubeID' => 'youtube_id:json_text',
|
||||
protected static $array_mappings =
|
||||
[
|
||||
'YouTubeID' => 'you_tube_id:json_text',
|
||||
'DateUploaded' => 'data_uploaded:datetime_epoch',
|
||||
'Highlighted' => 'highlighted:json_boolean',
|
||||
'Views' => 'views:json_int',
|
||||
);
|
||||
];
|
||||
|
||||
}
|
|
@ -1613,7 +1613,7 @@ SQL;
|
|||
}
|
||||
if(empty($photo_url) && !empty($this->getTwitterName()) ){
|
||||
$twitterName = $this->getTwitterName();
|
||||
$photoUrl = sprintf("https://avatars.io/twitter/%s", rim(trim($twitterName, '@')));
|
||||
$photoUrl = sprintf("https://avatars.io/twitter/%s", trim(trim($twitterName, '@')));
|
||||
}
|
||||
if(empty($photoUrl)){
|
||||
$photoUrl = File::getCloudLinkForImages("generic-speaker-icon.png");
|
||||
|
|
Loading…
Reference in New Issue