func (lgc *Logic) DeleteStream(id string) (int, error) {
	ok, err := lgc.HasStream(id)
	if err != nil {
		lgc.Logger().WithFields(log.Fields{
			"error": err, "id": id,
		}).Error("lgc.HasStream() is failure")
		return 500, err
	}
	if !ok {
		return 404, fmt.Errorf("no stream found with id <%s>", id)
	}
	if err := lgc.store.DeleteStream(id); err != nil {
		return 500, err
	}
	return 200, nil
}
// DeleteStream deletes a stream from the Server.
DeleteStream deletes a stream from the Server.
// DeleteStream deletes a stream from the Server .
func (lgc *Logic) DeleteStream(id string) (int, error) {
	ok, err := lgc.HasStream(id)
	if err != nil {
		lgc.Logger().WithFields(log.Fields{
			"error": err, "id": id,
		}).Error("lgc.HasStream() is failure")
		return 500, err
	}
	if !ok {
		return 404, fmt.Errorf("no stream found with id <%s>", id)
	}
	if err := lgc.store.DeleteStream(id); err != nil {
		return 500, err
	}
	return 200, nil
}
func ( lgc * Logic ) DeleteStream ( id string ) ( int , error ) { ok , err := lgc . HasStream ( id ) if err != nil { lgc . Logger ( ) . WithFields ( log . Fields { " " : err , " " : id , } ) . Error ( " " ) return 500 , err } if ! ok { return 404 , fmt . Errorf ( " " , id ) } if err := lgc . store . DeleteStream ( id ) ; err != nil { return 500 , err } return 200 , nil }
DeleteStream deletes a stream from the Server.
DeleteStream deletes a stream from the Server .