mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-14 20:07:50 +00:00
chore: add view field into shortcut api
This commit is contained in:
@ -60,6 +60,7 @@ type Activity struct {
|
||||
type FindActivity struct {
|
||||
Type ActivityType
|
||||
Level ActivityLevel
|
||||
Where []string
|
||||
}
|
||||
|
||||
func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity, error) {
|
||||
@ -142,6 +143,9 @@ func listActivities(ctx context.Context, tx *sql.Tx, find *FindActivity) ([]*Act
|
||||
if find.Level != "" {
|
||||
where, args = append(where, "level = ?"), append(args, find.Level.String())
|
||||
}
|
||||
if find.Where != nil {
|
||||
where = append(where, find.Where...)
|
||||
}
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
|
Reference in New Issue
Block a user