aboutsummaryrefslogtreecommitdiff
path: root/src/services/MomentService.ts
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-09 01:38:04 -0400
committerIvan Chen <ivan@tagg.id>2021-07-09 15:56:47 -0400
commit74d0ad5bab6f0d058fc03095fa0a313499162579 (patch)
tree2ca74c704d6d7d4693338ff84df747d7884c0771 /src/services/MomentService.ts
parentf78bb9fea2128825d9c9cf4a64a7b78a288250b1 (diff)
Lint, Update service code to allow category edition
Diffstat (limited to 'src/services/MomentService.ts')
-rw-r--r--src/services/MomentService.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/services/MomentService.ts b/src/services/MomentService.ts
index 0c93876a..50cedef9 100644
--- a/src/services/MomentService.ts
+++ b/src/services/MomentService.ts
@@ -59,6 +59,7 @@ export const postMoment = async (
export const patchMoment = async (
momentId: string,
caption: string,
+ category: string,
tags: {
x: number;
y: number;
@@ -69,7 +70,8 @@ export const patchMoment = async (
try {
const request = new FormData();
request.append('moment_id', momentId);
- request.append('captions', JSON.stringify({[momentId]: caption}));
+ request.append('caption', caption);
+ request.append('category', category);
request.append('tags', JSON.stringify(tags));
const token = await AsyncStorage.getItem('token');
let response = await fetch(MOMENTS_ENDPOINT, {