Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestSystem.cpp @ 1433:461e7554bff7
refactoring: LuaScripting
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 15:09:34 +0200 |
parents | 4460e2622016 |
children | f9cd40166269 |
comparison
equal
deleted
inserted
replaced
1432:0ac74fa21db8 | 1433:461e7554bff7 |
---|---|
98 { | 98 { |
99 std::string result; | 99 std::string result; |
100 ServerContext& context = OrthancRestApi::GetContext(call); | 100 ServerContext& context = OrthancRestApi::GetContext(call); |
101 | 101 |
102 { | 102 { |
103 ServerContext::LuaContextLocker locker(context); | 103 LuaScripting::Locker locker(context.GetLua()); |
104 locker.GetLua().Execute(result, call.GetPostBody()); | 104 locker.GetLua().Execute(result, call.GetPostBody()); |
105 } | 105 } |
106 | 106 |
107 call.GetOutput().AnswerBuffer(result, "text/plain"); | 107 call.GetOutput().AnswerBuffer(result, "text/plain"); |
108 } | 108 } |