Skip to content

Node.js based forum software built for the modern web

413 B
Raw Blame
'use strict';

define('admin/settings/cookies', ['alerts'], function (alerts) {
	const Cookies = {};

	Cookies.init = function () {
		$('#delete-all-sessions').on('click', function () {
			socket.emit('admin.deleteAllSessions', function (err) {
				if (err) {
					return alerts.error(err);
				}
				window.location.href = config.relative_path + '/login';
			});
			return false;
		});
	};

	return Cookies;
});