1
0
Fork 0

Merge pull request #2774 from pixelfed/staging

Staging
This commit is contained in:
daniel 2021-05-31 21:52:15 -06:00 committed by GitHub
commit d230ab9aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 242 additions and 218 deletions

View File

@ -199,9 +199,8 @@ class PublicApiController extends Controller
public function statusLikes(Request $request, $username, $id)
{
$profile = Profile::whereUsername($username)->whereNull('status')->firstOrFail();
$status = Status::whereProfileId($profile->id)->findOrFail($id);
$this->scopeCheck($profile, $status);
$status = Status::findOrFail($id);
$this->scopeCheck($status->profile, $status);
$likes = $this->getLikes($status);
return response()->json([
'data' => $likes

433
composer.lock generated

File diff suppressed because it is too large Load Diff

22
resources/assets/js/admin.js vendored Normal file
View File

@ -0,0 +1,22 @@
require('./polyfill');
window._ = require('lodash');
window.Popper = require('popper.js').default;
window.pixelfed = window.pixelfed || {};
window.$ = window.jQuery = require('jquery');
require('bootstrap');
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
require('readmore-js');
window.filesize = require('filesize');
window.Cookies = require('js-cookie');
require('jquery.scrollbar');
require('jquery-scroll-lock');
window.Chart = require('chart.js');
require('./lib/argon.js');
Chart.defaults.global.defaultFontFamily = "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif";
// fix bs4 custom paginators inherited from core app
Array.from(document.querySelectorAll('.pagination .page-link'))
.filter(el => el.textContent === '« Previous' || el.textContent === 'Next »')
.forEach(el => el.textContent = (el.textContent === 'Next »' ? '' :''));