mirror of
https://gitea.ingwaz.work/Ingwaz/openbrain-mcp.git
synced 2026-06-16 06:17:08 +00:00
Scope memories by API token and add shared-token e2e coverage
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use anyhow::{Result, anyhow};
|
||||
use anyhow::{anyhow, Result};
|
||||
use chrono::{DateTime, Duration, Utc};
|
||||
|
||||
pub fn parse_ttl_spec(ttl: &str) -> Result<Duration> {
|
||||
@@ -25,7 +25,9 @@ pub fn parse_ttl_spec(ttl: &str) -> Result<Duration> {
|
||||
.parse()
|
||||
.map_err(|_| anyhow!("invalid ttl '{ttl}'. Duration value must be a positive integer"))?;
|
||||
if value <= 0 {
|
||||
return Err(anyhow!("invalid ttl '{ttl}'. Duration value must be greater than zero"));
|
||||
return Err(anyhow!(
|
||||
"invalid ttl '{ttl}'. Duration value must be greater than zero"
|
||||
));
|
||||
}
|
||||
|
||||
let total_seconds = value
|
||||
|
||||
Reference in New Issue
Block a user