1
0

fix comment system

This commit is contained in:
2024-04-12 01:54:12 +09:00
parent 336827433e
commit b3df3250bb
17 changed files with 4503 additions and 174 deletions

22
tmp/northflank.zsh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/zsh
pass=`cat ~/.config/ai/api_card.json|jq -r .gitea_token`
/usr/bin/northflank exec service --project ent --service web --cmd "/app/data/api/backup.sh $pass"
function f(){
rm /app/data/api/backup.sh
echo '#!/bin/bash
pass=$1
git config --global user.email syui@syui.ai
git config --global user.name syui
cp -rf /app/data/new.sqlite /app/data/api/latest.sqlite
cp -rf /app/data/new.sqlite /app/data/api/`date '+%w'`.sqlite
cd /app/data/api
git remote add origin https://$pass@git.syui.ai/ai/api_sqlite
git add .
git commit -m backup
git push origin main
git remote rm origin
' >> /app/data/api/backup.sh
chmod +x /app/data/api/backup.sh
}

View File

@ -539,6 +539,33 @@ func (h *OgentHandler) CreateMa(ctx context.Context, req *CreateMaReq) (CreateMa
if v, ok := req.BskyURL.Get(); ok {
b.SetBskyURL(v)
}
if v, ok := req.CidRoot.Get(); ok {
b.SetCidRoot(v)
}
if v, ok := req.URIRoot.Get(); ok {
b.SetURIRoot(v)
}
if v, ok := req.Root.Get(); ok {
b.SetRoot(v)
}
if v, ok := req.Comment.Get(); ok {
b.SetComment(v)
}
if v, ok := req.Blog.Get(); ok {
b.SetBlog(v)
}
if v, ok := req.BlogURL.Get(); ok {
b.SetBlogURL(v)
}
if v, ok := req.Domain.Get(); ok {
b.SetDomain(v)
}
if v, ok := req.Host.Get(); ok {
b.SetHost(v)
}
if v, ok := req.Feed.Get(); ok {
b.SetFeed(v)
}
if v, ok := req.UpdatedAt.Get(); ok {
b.SetUpdatedAt(v)
}
@ -646,6 +673,33 @@ func (h *OgentHandler) UpdateMa(ctx context.Context, req *UpdateMaReq, params Up
if v, ok := req.BskyURL.Get(); ok {
b.SetBskyURL(v)
}
if v, ok := req.CidRoot.Get(); ok {
b.SetCidRoot(v)
}
if v, ok := req.URIRoot.Get(); ok {
b.SetURIRoot(v)
}
if v, ok := req.Root.Get(); ok {
b.SetRoot(v)
}
if v, ok := req.Comment.Get(); ok {
b.SetComment(v)
}
if v, ok := req.Blog.Get(); ok {
b.SetBlog(v)
}
if v, ok := req.BlogURL.Get(); ok {
b.SetBlogURL(v)
}
if v, ok := req.Domain.Get(); ok {
b.SetDomain(v)
}
if v, ok := req.Host.Get(); ok {
b.SetHost(v)
}
if v, ok := req.Feed.Get(); ok {
b.SetFeed(v)
}
if v, ok := req.UpdatedAt.Get(); ok {
b.SetUpdatedAt(v)
}