hardlounge/client/js/socket-events/sessions_list.js

10 lines
222 B
JavaScript
Raw Normal View History

2017-08-15 09:44:29 +00:00
"use strict";
2017-08-15 09:44:29 +00:00
const socket = require("../socket");
const store = require("../store").default;
2017-08-15 09:44:29 +00:00
socket.on("sessions:list", function(data) {
data.sort((a, b) => b.lastUse - a.lastUse);
store.commit("sessions", data);
2017-08-15 09:44:29 +00:00
});