Fixes #10
- Remove explicition resolve for media in RouteServicePRovider - Set usage of media id on media routes everywhere
This commit is contained in:
parent
eb212215a8
commit
14aeec5e2a
6 changed files with 8 additions and 13 deletions
|
|
@ -41,11 +41,6 @@ class RouteServiceProvider extends ServiceProvider
|
|||
->group(base_path('routes/api.php'));
|
||||
});
|
||||
|
||||
Route::bind('media', function ($value) {
|
||||
return Media::query()
|
||||
->where('uid', $value)
|
||||
->firstOrFail();
|
||||
});
|
||||
Route::bind('basket_uuid', function ($value) {
|
||||
return Panier::where('uid', $value)
|
||||
->with('owner')->firstOrFail();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
</button>
|
||||
<button
|
||||
class="float-right mr-10 copyclipboard"
|
||||
v-clipboard="'https://dam.lesidc.com/media/' + this.storeMedia.uid"
|
||||
v-clipboard="'https://dam.lesidc.com/media/' + this.storeMedia.id"
|
||||
title="Copier le lien"
|
||||
>
|
||||
<font-awesome-icon icon="link" />
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ export default {
|
|||
},
|
||||
SetIdArcadia() {
|
||||
axios
|
||||
.post(`/ajax/media/${this.oMedia.uid}/set-id-arcadia`)
|
||||
.post(`/ajax/media/${this.oMedia.id}/set-id-arcadia`)
|
||||
.then((response) => {
|
||||
if (response.data === true) {
|
||||
this.oMedia.isLocked = true;
|
||||
|
|
@ -575,7 +575,7 @@ export default {
|
|||
SaveMedia() {
|
||||
const self = this;
|
||||
axios
|
||||
.put(`/ajax/media/${self.oMedia.uid}`, self.oMedia)
|
||||
.put(`/ajax/media/${self.oMedia.id}`, self.oMedia)
|
||||
.then((response) => {
|
||||
self.$loading.hide();
|
||||
if (response.data.status === true) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export default {
|
|||
) {
|
||||
const _this2 = this;
|
||||
axios
|
||||
.post(`/ajax/media/${this.storeMedia.uid}/get-media-others-infos`)
|
||||
.post(`/ajax/media/${this.storeMedia.id}/get-media-others-infos`)
|
||||
.then((response) => {
|
||||
_this2.history = response.data.history;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default {
|
|||
) {
|
||||
const _this2 = this;
|
||||
axios
|
||||
.post(`/ajax/media/${this.storeMedia.uid}/get-media-others-infos`)
|
||||
.post(`/ajax/media/${this.storeMedia.id}/get-media-others-infos`)
|
||||
.then((response) => {
|
||||
_this2.links = response.data.vignettes;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ Route::post('/ajax/add-depot-folder', [DossierController::class, 'addDepotFolder
|
|||
|
||||
// * Ajax pour la gestion de l'upload de média .
|
||||
Route::post('/ajax/upload-media/depot', [UploadController::class, 'uploadMediaFileIntoDepot'])
|
||||
->name('media.uploadDepot');
|
||||
->name('media.uploadDepot');
|
||||
Route::post('/ajax/upload-media/{sujet}/{dossier}', [UploadController::class, 'uploadMediaFile'])
|
||||
->name('media.upload');
|
||||
->name('media.upload');
|
||||
|
||||
// * Les pages Front panier public.
|
||||
Route::get('/basket/{basket_uuid}', [PanierController::class, 'showBasket']);
|
||||
Route::post('/ajax/download-media-public/{format?}', [MediaController::class, 'downloadMediaPublic'])
|
||||
->name('downloadMediaPublic');
|
||||
->name('downloadMediaPublic');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue