hardlounge/client/js/socket-events/sessions_list.js
Pavel Djundik 2f635069e0 Move vuex state to a separate file and reorganize some code
Co-Authored-By: Tim Miller-Williams <timmw@users.noreply.github.com>
2019-11-25 20:12:54 +02:00

10 lines
222 B
JavaScript

"use strict";
const socket = require("../socket");
const store = require("../store").default;
socket.on("sessions:list", function(data) {
data.sort((a, b) => b.lastUse - a.lastUse);
store.commit("sessions", data);
});