Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit ee06da7

Browse files
committed
/logour
1 parent 7a83cd5 commit ee06da7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Workflow/AbstractREST.cls.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Workflow/REST.cls.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
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"/>
@@ -22,15 +22,14 @@
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

0 commit comments

Comments
 (0)