Skip to content

Conversation

@wong2
Copy link
Contributor

@wong2 wong2 commented Oct 11, 2016

Usage: lc star 396

if (e) return log.fail(e);
core.starProblem(problem, function(e) {
if (e) return log.fail(e);
log.info(h.prettyText(' Starred', true));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks dude, overall LGTM. Just wondering what if run 'lc star 1' twice, will it be un-starred in the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skygragon nope, the api is idempotent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unstar is done by sending a DELETE request to the same endpoint

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think that is good enough for the moment. I guess there will be more patches to address related functions like 'unstar'. Also want to update local cache whenever is_favor is updated in problem json.

@skygragon skygragon merged commit 7e3464b into skygragon:master Oct 12, 2016
tainenko pushed a commit to tainenko/leetcode-cli that referenced this pull request Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants