mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-06-08 05:58:29 -05:00
23 lines
519 B
Go
23 lines
519 B
Go
|
|
package subtitle
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"go-common/app/interface/main/dm2/model"
|
||
|
|
"go-common/library/ecode"
|
||
|
|
"go-common/library/log"
|
||
|
|
)
|
||
|
|
|
||
|
|
// Update fn
|
||
|
|
func (d *Dao) Update(c context.Context, aid int64, open bool, lan string) (err error) {
|
||
|
|
var arg = &model.ArgSubtitleAllowSubmit{
|
||
|
|
Aid: aid,
|
||
|
|
AllowSubmit: open,
|
||
|
|
Lan: lan,
|
||
|
|
}
|
||
|
|
if err = d.sub.SubtitleSujectSubmit(c, arg); err != nil {
|
||
|
|
log.Error("d.sub.SubtitleSujectSubmit (%+v) error(%v)", arg, err)
|
||
|
|
err = ecode.CreativeSubtitleAPIErr
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|