mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 00:44:41 +08:00
converted image picker to blade-based component
Also updated some other JS translations
This commit is contained in:
@ -117,7 +117,7 @@ class AttachmentController extends Controller
|
||||
}
|
||||
|
||||
$attachment = $this->attachmentService->updateFile($attachment, $request->all());
|
||||
return $attachment;
|
||||
return $this->jsonSuccess($attachment, trans('entities.attachments_updated_success'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,6 +117,17 @@ abstract class Controller extends BaseController
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a json respons with a message attached as a header.
|
||||
* @param $data
|
||||
* @param string $successMessage
|
||||
* @return $this
|
||||
*/
|
||||
protected function jsonSuccess($data, $successMessage = "")
|
||||
{
|
||||
return response()->json($data)->header('message-success', $successMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send back a json error message.
|
||||
* @param string $messageText
|
||||
|
Reference in New Issue
Block a user