MCPcopy Create free account
hub / github.com/acking-you/static_flow / create_request

Method create_request

crates/store/src/article_request_store.rs:197–226  ·  view source on GitHub ↗
(
        &self,
        input: NewArticleRequestInput,
    )

Source from the content-addressed store, hash-verified

195 }
196
197 pub async fn create_request(
198 &self,
199 input: NewArticleRequestInput,
200 ) -> Result<ArticleRequestRecord> {
201 let now = now_ms();
202 let record = ArticleRequestRecord {
203 request_id: input.request_id,
204 article_url: input.article_url,
205 title_hint: normalize_opt(input.title_hint),
206 request_message: input.request_message,
207 nickname: input.nickname,
208 requester_email: normalize_opt(input.requester_email),
209 frontend_page_url: normalize_opt(input.frontend_page_url),
210 status: REQUEST_STATUS_PENDING.to_string(),
211 fingerprint: input.fingerprint,
212 client_ip: input.client_ip,
213 ip_region: input.ip_region,
214 admin_note: None,
215 failure_reason: None,
216 ingested_article_id: None,
217 attempt_count: 0,
218 created_at: now,
219 updated_at: now,
220 ai_reply: None,
221 parent_request_id: normalize_opt(input.parent_request_id),
222 };
223 let table = self.requests_table().await?;
224 upsert_request_record(&table, &record).await?;
225 Ok(record)
226 }
227
228 pub async fn get_request(&self, request_id: &str) -> Result<Option<ArticleRequestRecord>> {
229 let table = self.requests_table().await?;

Calls 4

upsert_request_recordFunction · 0.85
requests_tableMethod · 0.80
now_msFunction · 0.70
normalize_optFunction · 0.70

Tested by

no test coverage detected