]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6022 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jun 2023 08:32:34 +0000 (10:32 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jun 2023 08:32:34 +0000 (10:32 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Http/Controllers/Admin/Operations/FluidbookPublication/Services/SocialImageOperation.php

index 395aff9fafe7b120ae1ed4463a31e8f7b604b3d4..a95040a1962dac289adf89f09604d992494285b5 100644 (file)
@@ -1103,7 +1103,7 @@ class Compiler extends Base implements CompilerInterface
 
             $dim = SocialImage::getSocialImageSize($this->getFluidbook());
             if ($dim) {
-                $socialImage = backpack_url('services/socialimage/' . $this->getFluidbook()->cid);
+                $socialImage = backpack_url('services/socialimage/' . $this->getFluidbook()->cid . '/' . time());
                 $socialImageWidth = $dim[0];
                 $socialImageHeight = $dim[1];
 
index ccd1051bddcacbf71f82690c7a4267c02f5ae782..c1ca93b5760451e78915c6c42c7e6c5f283fbfb7 100644 (file)
@@ -16,7 +16,7 @@ trait SocialImageOperation
     protected function setupSocialimageRoutes($segment, $routeName, $controller)
     {
         foreach (['services', 's'] as $segment) {
-            Route::match(['get'], $segment . '/socialimage/{cid?}', $controller . '@socialImage')->withoutMiddleware([CheckIfAdmin::class]);
+            Route::match(['get'], $segment . '/socialimage/{cid?}/{time?}', $controller . '@socialImage')->withoutMiddleware([CheckIfAdmin::class]);
             Route::match(['get'], $segment . '/socialimage', $controller . '@ws2SocialImage')->withoutMiddleware([CheckIfAdmin::class]);
             Route::match(['get'], $segment . '/facebook_thumbnail', $controller . '@ws2SocialImage')->withoutMiddleware([CheckIfAdmin::class]);
         }
@@ -36,7 +36,7 @@ trait SocialImageOperation
         abort(404);
     }
 
-    public function socialImage($cid = null)
+    public function socialImage($cid = null, $time = null)
     {
         $publication = FluidbookPublication::where('cid', $cid)->first();
         if (null === $publication) {