create_token added to before

This commit is contained in:
Tanisha Payne 2021-06-15 18:34:43 -04:00
parent 75661b6c86
commit aeff9e9d3f
2 changed files with 25 additions and 39 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'json'
module Vmpooler
@ -36,9 +38,9 @@ module Vmpooler
end
get '/restart/?' do
content_type :json
# token authentication
need_token!
# restart operation
exit_process
status 200