Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
b32a947f
Commit
b32a947f
authored
Dec 04, 2021
by
Mohammad Faraz Abisha Mirza
Browse files
Merge branch 'addCommentFunction' into 'master'
[BE] : Add comment function See merge request
!161
parents
f1da1096
2794b140
Pipeline
#88979
passed with stage
in 10 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/service/firestore/ecosystem/addComment.ts
0 → 100644
View file @
b32a947f
import
firebase
from
"
firebase
"
;
import
{
getEnv
}
from
"
../../../helpers/getEnv
"
;
export
const
addComments
=
async
(
threadId
:
string
,
comment
:
string
,
userId
:
string
)
=>
{
const
db
=
firebase
.
firestore
();
return
await
db
.
collection
(
"
threads_comments_
"
+
getEnv
()).
add
({
threadId
:
threadId
,
timestamp
:
firebase
.
firestore
.
FieldValue
.
serverTimestamp
(),
content
:
comment
,
userId
:
userId
,
});
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment