MCPcopy Create free account
hub / github.com/YougLin-dev/amp-server / sync_thread

Function sync_thread

api/src/user/mod.rs:62–88  ·  view source on GitHub ↗
(Json(request): Json<SyncThreadRequest>)

Source from the content-addressed store, hash-verified

60}
61
62async fn sync_thread(Json(request): Json<SyncThreadRequest>) -> Json<serde_json::Value> {
63 let thread_id = if let Some(Some(thread_meta)) = request.thread_metas.first()
64 && let Some(thread_id) = &thread_meta.thread_id
65 {
66 thread_id
67 } else {
68 return Json(json!(
69 {
70 "threadActions": [],
71 }
72 ));
73 };
74 Json(json!(
75 {
76 "threadActions": [
77 {
78 "id": thread_id,
79 "action": "meta",
80 "meta": {
81 "private": false,
82 "public": false,
83 }
84 }
85 ],
86 }
87 ))
88}
89
90async fn internal(Json(request): Json<InternalRequest>) -> Json<serde_json::Value> {
91 match request.method.as_str() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected