// 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 DelDevice(ctx context.Context, req *v1.DelDeviceRequest) (reply *v1.DelDeviceReply, err error) { if req.Sn == "" { return nil, errors.ParamsError } DeleteDeviceInfoFromMem(req.Sn, req.DeviceCode) DeleteDeviceInfoByIdFromMem(req.Sn, req.DeviceCode) return &v1.DelDeviceReply{}, nil }