Skip to content

Commit

Permalink
feat: update on slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynzhel committed Dec 8, 2023
1 parent cd79aa9 commit 9a9bf88
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client/src/components/post/MakeCommentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const MakeCommentModal = ({
toast.error(ToastMessages.NOUSERCREDS);
}
} else {
if (post.author.host === Hosts.CODEMONKEYS) {
if (post.author.host === Hosts.CODEMONKEYS || post.author.host === Hosts.TRIET) {
data = {
...data,
id: `${post.id}/comments/${uuidv4()}`,
Expand Down Expand Up @@ -262,6 +262,10 @@ const MakeCommentModal = ({
if (post.author.host === Hosts.TRIET) {
data = {
...data,
"author": {
...data.author,
"id": `${data.author.id}/`,
},
"id": `${data.id}/`,
}
}
Expand Down
12 changes: 12 additions & 0 deletions client/src/components/post/MakePostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ const MakePostModal = ({
// triet requires / at the end for ids
postData = {
...postData,
"author": {
...postData.author,
"id": `${postData.author.id}/`,
},
"id": `${postData.id}/`
}
}
Expand Down Expand Up @@ -279,6 +283,10 @@ const MakePostModal = ({
// triet requires / at the end for ids
postData = {
...postData,
"author": {
...postData.author,
"id": `${postData.author.id}/`,
},
"id": `${postData.id}/`
}
}
Expand Down Expand Up @@ -309,6 +317,10 @@ const MakePostModal = ({
// triet requires / at the end for ids
postData = {
...postData,
"author": {
...postData.author,
"id": `${postData.author.id}/`,
},
"id": `${postData.id}/`
}
}
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/post/like/CommentLikes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const CommentLikes = ({
if (isObjectFromTriet(authorUrl)) {
data = {
...data,
"author": {
...data.author,
"id": `${data.author.id}/`,
},
"@context": Links.LIKECONTEXT,
"object": `${data.object}/`,
}
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/post/like/PostLikes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const PostLikes = ({
if (post.author.host === Hosts.TRIET) {
data = {
...data,
"author": {
...data.author,
"id": `${data.author.id}/`,
},
"@context": Links.LIKECONTEXT,
"object": `${data.object}/`,
}
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/post/post-item/PostPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const PostPage = () => {
toast.error(ToastMessages.NOUSERCREDS);
}
} else {
if (post.author.host === Hosts.CODEMONKEYS) {
if (post.author.host === Hosts.CODEMONKEYS || post.author.host === Hosts.TRIET) {
data = {
...data,
id: `${post.id}/comments/${uuidv4()}`,
Expand Down Expand Up @@ -318,6 +318,10 @@ const PostPage = () => {
if (postHost === Hosts.TRIET) {
data = {
...data,
"author": {
...data.author,
"id": `${data.author.id}/`,
},
"id": `${data.id}/`,
}
}
Expand Down

0 comments on commit 9a9bf88

Please sign in to comment.