// RemoveByCode use the authorization code to delete the token information
RemoveByCode use the authorization code to delete the token information
// RemoveByCode use the authorization code to delete the token information
func (ts *MgoTokenStore) RemoveByCode(code string) (err error) {
	ts.H(ts.collection, func(c *mongo.Collection) {
		_, mgoErr := c.DeleteMany(context.TODO(), bson.M{"Code": code})
		if mgoErr != nil {
			if mgoErr == mongo.ErrNoDocuments {
				err = o2x.ErrNotFound
				return
			}
			err = mgoErr
		}
	})
	return
}
func ( ts * MgoTokenStore ) RemoveByCode ( code string ) ( err error ) { ts . H ( ts . collection , func ( c * mongo . Collection ) { _ , mgoErr := c . DeleteMany ( context . TODO ( ) , bson . M { " " : code } ) if mgoErr != nil { if mgoErr == mongo . ErrNoDocuments { err = o2x . ErrNotFound return } err = mgoErr } } ) return }
RemoveByCode use the authorization code to delete the token information
RemoveByCode use the authorization code to delete the token information