1234567891011121314151617181920 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package device
- import (
- "context"
- "smart-auth/errors"
- "smart-auth/pb/v1"
- )
- func DeviceChangeNotify(ctx context.Context, req *v1.DeviceChangeNotifyRequest) (reply *v1.DeviceChangeNotifyReply, err error) {
- if req.Sn == "" || req.DeviceCode == 0 {
- return nil, errors.ParamsError
- }
- DeleteDeviceInfoFromMem(req.Sn, req.DeviceCode)
- DeleteDeviceInfoByIdFromMem(req.Sn, req.DeviceCode)
- return &v1.DeviceChangeNotifyReply{}, nil
- }
|