Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F21588692
response.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
655 B
Referenced Files
None
Subscribers
None
response.ts
View Options
import
SealiousError
from
"./errors"
;
class
Response
{
status
:
"error"
|
"success"
;
type
:
string
;
status_message
:
string
;
data
:
any
;
constructor
(
data
:
any
,
is_error
:
boolean
,
type
:
string
,
status_message
:
string
)
{
this
.
status
=
is_error
?
"error"
:
"success"
;
this
.
type
=
type
||
"response"
;
this
.
status_message
=
status_message
||
"ok"
;
this
.
data
=
data
||
{};
}
static
fromError
(
sealious_error
:
SealiousError
)
{
return
{
data
:
sealious_error
.
data
||
{},
is_error
:
true
,
type
:
sealious_error
.
type
,
status_message
:
sealious_error
.
message
,
message
:
sealious_error
.
message
,
};
}
}
module
.
exports
=
Response
;
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 7, 14:47 (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1181806
Default Alt Text
response.ts (655 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline