Added options for setting the site targets
This commit is contained in:
parent
a31c8e48ce
commit
cb45f6aa53
5 changed files with 74 additions and 21 deletions
|
|
@ -23,6 +23,14 @@ func (db *DB) InsertPublishTarget(ctx context.Context, target *models.PublishTar
|
|||
return nil
|
||||
}
|
||||
|
||||
func (db *DB) UpdatePublishTarget(ctx context.Context, target models.PublishTarget) error {
|
||||
return db.q.UpdatePublishTarget(ctx, dbq.UpdatePublishTargetParams{
|
||||
ID: target.ID,
|
||||
Url: target.URL,
|
||||
TargetRef: target.TargetRef,
|
||||
})
|
||||
}
|
||||
|
||||
func (db *DB) GetPublishTargets(ctx context.Context, siteID int64) ([]models.PublishTarget, error) {
|
||||
res, err := db.q.ListTargetsOfSite(ctx, siteID)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue