feat(mode): add demo mode (#1121)

* feat(mode): add demo mode

* chroe: Update store/db/db.go

Co-authored-by: boojack <stevenlgtm@gmail.com>

* chroe: Update store/db/db.go

Co-authored-by: boojack <stevenlgtm@gmail.com>

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
Yoshino-s
2023-02-19 13:36:45 +08:00
committed by GitHub
parent d0b8b076cf
commit afaaec8492
9 changed files with 27 additions and 23 deletions

View File

@ -38,7 +38,7 @@ func (raw *activityRaw) toActivity() *api.Activity {
// CreateActivity creates an instance of Activity.
func (s *Store) CreateActivity(ctx context.Context, create *api.ActivityCreate) (*api.Activity, error) {
if s.profile.Mode != "dev" {
if s.profile.Mode == "prod" {
return nil, nil
}