@@ -23,28 +23,28 @@ pub async fn handle(
23
23
. encode ( & mut bytes)
24
24
. expect ( "should never fails" ) ;
25
25
return bytes;
26
- } ,
26
+ }
27
27
} ;
28
28
let result = match body {
29
29
RequestBody :: SpaceById ( args) => {
30
30
space_by_id ( client, args. space_id ) . await
31
- } ,
31
+ }
32
32
RequestBody :: SpaceByHandle ( args) => {
33
33
space_by_handle ( client, args. handle ) . await
34
- } ,
34
+ }
35
35
RequestBody :: PostIdsBySpaceId ( args) => {
36
36
posts_ids_by_space_id ( client, args. space_id ) . await
37
- } ,
37
+ }
38
38
RequestBody :: PostById ( args) => post_by_id ( client, args. post_id ) . await ,
39
39
RequestBody :: ReactionIdsByPostId ( args) => {
40
40
reactions_ids_by_post_id ( client, args. post_id ) . await
41
- } ,
41
+ }
42
42
RequestBody :: ReactionById ( args) => {
43
43
reaction_by_id ( client, args. reaction_id ) . await
44
- } ,
44
+ }
45
45
RequestBody :: ReplyIdsByPostId ( args) => {
46
46
reply_ids_by_post_id ( client, args. post_id ) . await
47
- } ,
47
+ }
48
48
} ;
49
49
let response = match result {
50
50
Ok ( body) => Response { body : Some ( body) } ,
@@ -69,7 +69,7 @@ async fn space_by_id(
69
69
space : Some ( space. into ( ) ) ,
70
70
} ) ;
71
71
Ok ( body)
72
- } ,
72
+ }
73
73
None => Err ( Error {
74
74
kind : error:: Kind :: NotFound . into ( ) ,
75
75
msg : String :: from ( "Space Not Found" ) ,
@@ -92,7 +92,7 @@ async fn space_by_handle(
92
92
} ;
93
93
let body = ResponseBody :: SpaceByHandle ( SpaceByHandle { space } ) ;
94
94
Ok ( body)
95
- } ,
95
+ }
96
96
None => Err ( Error {
97
97
kind : error:: Kind :: NotFound . into ( ) ,
98
98
msg : String :: from ( "Space Not Found" ) ,
@@ -112,7 +112,7 @@ async fn posts_ids_by_space_id(
112
112
post_ids : ids,
113
113
} ) ;
114
114
Ok ( body)
115
- } ,
115
+ }
116
116
None => Err ( Error {
117
117
kind : error:: Kind :: NotFound . into ( ) ,
118
118
msg : String :: from ( "Space Not Found" ) ,
@@ -132,7 +132,7 @@ async fn post_by_id(
132
132
post : Some ( post. into ( ) ) ,
133
133
} ) ;
134
134
Ok ( body)
135
- } ,
135
+ }
136
136
None => Err ( Error {
137
137
kind : error:: Kind :: NotFound . into ( ) ,
138
138
msg : String :: from ( "Post Not Found" ) ,
@@ -152,7 +152,7 @@ async fn reactions_ids_by_post_id(
152
152
reaction_ids : ids,
153
153
} ) ;
154
154
Ok ( body)
155
- } ,
155
+ }
156
156
None => Err ( Error {
157
157
kind : error:: Kind :: NotFound . into ( ) ,
158
158
msg : String :: from ( "Post Not Found" ) ,
@@ -172,7 +172,7 @@ async fn reaction_by_id(
172
172
reaction : Some ( reaction. into ( ) ) ,
173
173
} ) ;
174
174
Ok ( body)
175
- } ,
175
+ }
176
176
None => Err ( Error {
177
177
kind : error:: Kind :: NotFound . into ( ) ,
178
178
msg : String :: from ( "Reaction Not Found" ) ,
@@ -192,7 +192,7 @@ async fn reply_ids_by_post_id(
192
192
reply_ids : ids,
193
193
} ) ;
194
194
Ok ( body)
195
- } ,
195
+ }
196
196
None => Err ( Error {
197
197
kind : error:: Kind :: NotFound . into ( ) ,
198
198
msg : String :: from ( "Post Not Found" ) ,
0 commit comments