Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expire Never defaults to 24 hours #2

Closed
r44v opened this issue May 3, 2018 · 3 comments
Closed

Expire Never defaults to 24 hours #2

r44v opened this issue May 3, 2018 · 3 comments

Comments

@r44v
Copy link

r44v commented May 3, 2018

Selecting Never creates a paste that expires in 24 hours,

According to the developer the pastery api does not have an option for never expire. What may work is using the parameter duration: 26280000, this results in a paste of about 50 years.

The parameter duration: 0 results in an error.

@maximeplante
Copy link
Owner

maximeplante commented May 3, 2018

I am not passing any duration parameter when the duration is equal to 0.

if (duration <= 0) {
query = querystring.stringify({
api_key: apiKey,
title: title,
});
} else {
query = querystring.stringify({
api_key: apiKey,
duration: duration,
title: title,
});
}

I'm gonna take a look at it asap.

@maximeplante
Copy link
Owner

maximeplante commented May 4, 2018

I wrote to the author of Pastery and there is no way of setting the expiration to Never in the api calls as of now. Somehow I thought my solution worked!

I used your solution in release 0.0.4. Thanks a lot for pointing it out!

@r44v
Copy link
Author

r44v commented May 4, 2018

Works like a charm, Thanks

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

No branches or pull requests

2 participants