Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22399811
me-subject.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
735 B
Referenced Files
None
Subscribers
None
me-subject.ts
View Options
import
{
LeafSubject
}
from
"../subject"
;
import
*
as
Errors
from
"../../response/errors"
;
import
{
ActionName
}
from
"../../action"
;
import
Context
from
"../../context"
;
export
default
class
MeSubject
extends
LeafSubject
{
async
performAction
(
context
:
Context
,
action_name
:
ActionName
,
params
:
any
)
{
if
(
!
context
.
user_id
)
{
throw
new
Errors
.
InvalidCredentials
(
"You're not logged in!"
);
}
try
{
if
(
action_name
===
"show"
)
{
return
this
.
app
.
collections
.
users
.
list
(
context
)
.
setParams
(
params
)
.
fetch
();
}
}
catch
(
error
)
{
if
(
error
.
type
===
"not_found"
)
{
throw
new
Errors
.
InvalidCredentials
(
"You're not logged in!"
);
}
throw
error
;
}
}
getName
()
{
return
"me"
;
}
}
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 17:46 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1229275
Default Alt Text
me-subject.ts (735 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline