Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996397
me-subject.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
730 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
{
return
await
this
.
app
.
runAction
(
context
,
[
"collections"
,
"users"
,
context
.
user_id
],
action_name
,
params
);
}
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
text/x-java
Expires
Tue, Dec 24, 14:02 (18 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557235
Default Alt Text
me-subject.ts (730 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment