Admin: move work from js to server side