DoAddUser 校验并热增用户。
(ctx context.Context, cfg coremanager.UserConfig)
| 170 | |
| 171 | // DoAddUser 校验并热增用户。 |
| 172 | func (a *API) DoAddUser(ctx context.Context, cfg coremanager.UserConfig) error { |
| 173 | if cfg.InboundTag == "" || cfg.Email == "" { |
| 174 | return errors.New("inbound_tag and email are required") |
| 175 | } |
| 176 | return a.activeManager().AddUser(ctx, cfg) |
| 177 | } |
| 178 | |
| 179 | // DoRemoveUser 校验并热删用户。 |
| 180 | func (a *API) DoRemoveUser(ctx context.Context, inboundTag, email string) error { |
no test coverage detected