This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ Called for a REST page in the event of a login being required
351351 #; Write out the header
352352 Do %response.WriteHTTPHeader()
353353
354- Write "{""Error"":""Access Denied ""}"
354+ Write "{""Error"":""Access denied ""}"
355355
356356 #; Done
357357 Quit $$$OK
Original file line number Diff line number Diff line change 1313<XMLNamespace >http://www.intersystems.com/urlmap</XMLNamespace >
1414<Data ><![CDATA[
1515<Routes>
16- <Route Url="/login " Method="POST " Call="DoLogin "/>
16+ <Route Url="/logout " Method="GET " Call="Logout "/>
1717<Route Url="/tasks" Method="GET" Call="GetTasks"/>
1818<Route Url="/tasks/:id" Method="GET" Call="GetTask"/>
1919<Route Url="/tasks/:id" Method="POST" Call="PostTask"/>
2222]]> </Data >
2323</XData >
2424
25- <Method name =" DoLogin " >
25+ <Method name =" Logout " >
2626<ClassMethod >1</ClassMethod >
2727<ReturnType >%Status</ReturnType >
2828<Implementation ><![CDATA[
2929 #dim %session As %CSP.Session
30- set st = %session.Login(%request.Content.Username,%request.Content.Password)
31- return:($$$ISERR(st)) st
32- write "{""Username"": """_$Username_"""}"
33- return $$$OK
30+ set st = %session.Logout(1)
31+ set %session.EndSession = 1
32+ return st
3433]]> </Implementation >
3534</Method >
3635
You can’t perform that action at this time.
0 commit comments