Coder Social home page Coder Social logo

longshotlabs / meteor-plans Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 4.0 21 KB

This Meteor package makes it super simple to define a set of subscription plans for a website or app, where a plan can be linked with an outside service plan (like a plan defined on Stripe).

Home Page: https://atmospherejs.com/aldeed/plans

License: MIT License

JavaScript 100.00%

meteor-plans's People

Contributors

aldeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

meteor-plans's Issues

Question: limits based on plans?

Hey Aldeed

Thanks for sharing the package, I was wondering if you ever needed to introduce limits based on plan for example free plan can add 5 rss feeds while pro plan has limit of 15 rss feeds.

If you did how did you organise it? Extend the plan object with extra function checks? I'm having manual checks at the methods for now. Love to get some ideas maybe there is a package for it? Couldn't find any.

Thank you

You must first set the end date to null, then add the new plan

There is an issue in the order of things done in this method

You must first update endDate, and then setAppPlansObject like so

// Update endDate to be null
  Utility.updateAppPlansObject(options, planName, {
    $unset: {
      'appPlans.list.$.endDate': '',
    },
  });

  Utility.setAppPlansObject(options, modifier);

  return true;

Otherwise, the $addToSet modifier does not work and it adds duplicate plans with exact same parameters in the appPlans.list object

https://github.com/aldeed/meteor-plans/blob/a6b2919600ca65317bdef021ae23350caa1bce60/server/utility.js#L86

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.