Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996168
metadata.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
589 B
Referenced Files
None
Subscribers
None
metadata.js
View Options
const
COLLECTION_NAME
=
"_metadata"
;
module
.
exports
=
app
=>
({
db_collection_name
:
COLLECTION_NAME
,
async
get
(
key
)
{
const
matches
=
await
app
.
Datastore
.
find
(
COLLECTION_NAME
,
{
key
});
if
(
matches
.
length
)
{
return
matches
[
0
].
value
;
}
else
{
undefined
;
}
},
async
set
(
key
,
value
)
{
const
matches
=
await
app
.
Datastore
.
find
(
COLLECTION_NAME
,
{
key
});
if
(
matches
.
length
)
{
await
app
.
Datastore
.
update
(
COLLECTION_NAME
,
{
key
:
key
},
{
$set
:
{
value
:
value
}
}
);
}
else
{
await
app
.
Datastore
.
insert
(
COLLECTION_NAME
,
{
key
,
value
});
}
},
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 12:25 (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557092
Default Alt Text
metadata.js (589 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment