notes(feishu): 完整带 ~/.local/share/lark-cli/ 加密 token 进 sidecar
deploy notes / build-and-deploy (push) Successful in 2m4s
deploy notes / build-and-deploy (push) Successful in 2m4s
之前只 cp config.json (365B 索引),user OAuth token 实际加密存在
~/.local/share/lark-cli/{master.key, appsecret_*.enc, cli_*_*.enc}。
secret 改成捎带全部 4 个文件;initContainer cp 到 PVC 两个子目录;
sidecar mount /root/.lark-cli + /root/.local/share/lark-cli 两路。
server.py 撤回 --as user(带上 token 后能调 docs:document:create scope)。
This commit is contained in:
@@ -198,6 +198,7 @@ def convert(req: ConvertReq):
|
||||
if not md.exists():
|
||||
raise HTTPException(400, f'md not found: {md}')
|
||||
|
||||
# user identity = fam 自己拥有 doc(host 上手动跑过 OAuth 授权一次)
|
||||
cmd = ['/usr/local/bin/markdown-to-feishu', str(md), '--as', 'user']
|
||||
if req.existing_doc_id:
|
||||
cmd += ['--update', req.existing_doc_id]
|
||||
@@ -241,6 +242,7 @@ def convert(req: ConvertReq):
|
||||
raise HTTPException(502, f'md2feishu missing doc_id/url: {data}')
|
||||
log.info("ok: doc_id=%s url=%s embeds=%s",
|
||||
doc_id, url, data.get('embeds_inserted'))
|
||||
|
||||
return {
|
||||
'doc_id': doc_id,
|
||||
'url': url,
|
||||
|
||||
Reference in New Issue
Block a user