Skip to content

Commit 912cad2

Browse files
authored
fix libraries timeout (#155)
Co-authored-by: Tomasz Smolarek <tomasz.smolarek@escolasoft.com>
1 parent 6f448c7 commit 912cad2

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

src/Http/Resources/LibraryResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public function toArray($request = null): array
4444
'tutorialUrl' => $this->tutorialUrl,
4545
'hasIcon' => $this->hasIcon,
4646
'libraryId' => $this->libraryId,
47-
'children' => $this->children,
4847
'languages' => $this->languages,
4948
];
5049
}

src/Models/H5PLibrary.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ class H5PLibrary extends Model
171171
'tutorialUrl',
172172
'hasIcon',
173173
'libraryId',
174-
'children',
175174
'languages',
176175
'addTo'
177176
];
@@ -278,11 +277,6 @@ public function dependencies(): HasMany
278277
return $this->hasMany(H5PLibraryDependency::class, 'library_id', 'id');
279278
}
280279

281-
public function children(): BelongsToMany
282-
{
283-
return $this->belongsToMany(H5PLibrary::class, 'hh5p_libraries_dependencies', 'library_id', 'required_library_id')->with('children');
284-
}
285-
286280
public function languages(): HasMany
287281
{
288282
return $this->hasMany(H5PLibraryLanguage::class, 'library_id');

src/Repositories/H5PRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ public function unlockDependencyStorage()
929929
*/
930930
public function deleteLibrary($library)
931931
{
932-
$libraryObj = H5pLibrary::with(['dependencies', 'children', 'languages'])->findOrFail($library->id);
932+
$libraryObj = H5pLibrary::with(['dependencies', 'languages'])->findOrFail($library->id);
933933

934934
// Remove main library from files
935935
$libraryPath = storage_path('app/h5p/libraries/' . $library->name . '-' . $library->major_version . '.' . $library->minor_version);

0 commit comments

Comments
 (0)