Pārlūkot izejas kodu

sanitized authentication

master
Archivist pirms 6 gadiem
vecāks
revīzija
b9b01d25dc
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. +1
    -2
      src/sales_backend.cr

+ 1
- 2
src/sales_backend.cr Parādīt failu

@ -66,8 +66,7 @@ post "/logout" do |context|
end
post "/logout-all" do |context|
authenticate!(context.request.headers["user"],UUID.new(context.request.headers["api_token"]))
user = User.from_json context.request.body.not_nil!
user = authenticate!(context.request.headers["user"],UUID.new(context.request.headers["api_token"]))
user_file = User.from_json File.read(Statics.data_path+"user/"+user.email)
user_file.tokens=Array(UUID).new
File.write(Statics.data_path+"user/"+user_file.email,user_file.to_json)

Notiek ielāde…
Atcelt
Saglabāt