Untitled Paste · 9GPx_dFt2
/**
 * Increments the view count for this upload.
 *
 * @return The file for this upload.
 */
public String getAndIncrementViews() {
    // Increment the views.
    var value = String.valueOf(++this.views);

    // Check if the paste should be burned.
    if (this.getExpiresAfter() == -1) {
        this.delete();
    } else {
        Async.run(this::save);
    }

    return value;
}
  • 7

    7/13/2023, 8:32:56 AM