This commit is contained in:
An Phan 2015-12-29 08:22:38 +07:00
parent 92b81c7b5b
commit ea18806f09
2 changed files with 3 additions and 4 deletions

View file

@ -27,7 +27,7 @@ class DataController extends Controller
return response()->json([
'artists' => Artist::orderBy('name')->with('albums', with('albums.songs'))->get(),
'settings' => Setting::all()->lists('value', 'key'),
'settings' => Setting::lists('value', 'key')->all(),
'playlists' => $playlists,
'interactions' => Interaction::byCurrentUser()->get(),
'users' => auth()->user()->is_admin ? User::all() : [],

View file

@ -1,6 +1,5 @@
import http from '../services/http';
import stub from '../stubs/settings';
import sharedStore from './shared';
export default {
stub,
@ -9,8 +8,8 @@ export default {
settings: [],
},
init() {
this.state.settings = sharedStore.state.settings;
init(settings) {
this.state.settings = settings;
},
all() {