54 Commits

Author SHA1 Message Date
Matthew O'Riordan
a234941cf3 API can require an API key for a user (disallow anonymous) 2013-05-20 07:18:57 +02:00
Remy Sharp
be56fa0db8 If logged-in user created first revision of a bin, then they "own" the bin url - and other users will only be able to clone the url 2013-04-05 22:09:12 +01:00
Tom Ashworth
653622b5f9 Bins are archiveable. 2013-01-14 15:05:20 +00:00
Tom Ashworth
4e60279529 Fix whitespace error. 2013-01-14 14:30:35 +00:00
Tom Ashworth
9bee7a91a1 UI for archive toggle. 2013-01-14 14:10:18 +00:00
Tom Ashworth
06cb5b9182 Fix SQLite errors & bring up to speed with MySQL driver, address #353. 2013-01-11 10:40:27 +00:00
Tom Ashworth
0cc499a7d3 add support to the owners table for panels with content, and unified the setBinOwner, setBinForUser, assignBin, et al 2013-01-09 16:50:33 +00:00
Tom Ashworth
cd2dff7202 Chunk the owners table to populate it slowly. 2013-01-09 10:23:37 +00:00
Tom Ashworth
cffe592468 Merge branch 'master' of github.com:remy/jsbin 2013-01-08 15:10:26 +00:00
Tom Ashworth
908e083408 Use date in touchOwnership params to overwrite touch. 2013-01-08 15:09:54 +00:00
Tom Ashworth
4ae07c5a7a Use last_updated, not created, and sort the revisions within a group. 2013-01-08 14:36:14 +00:00
Tom Ashworth
20cc16186a Population tool. 2013-01-08 11:00:24 +00:00
Tom Ashworth
85d641966e If bin has no created date, set it to now. 2013-01-07 15:02:28 +00:00
Tom Ashworth
1e0e62f377 Restore missing backtick and put error handler before use of results. 2013-01-07 14:19:34 +00:00
Tom Ashworth
be3ffbb4fc Add summary when bin created, saved and updated. 2013-01-07 12:36:52 +00:00
Remy Sharp
fa322f6414 Filthy way of getting home listing working again.
This solution is obviously a hack, and doesn't provide the detected
content, but gets the history working again to browse. Something's
wrong with the innodb tables and causes the database to hang (looking
for help here!).

Ref #333
2012-09-12 00:13:00 +01:00
Remy Sharp
2d47d76472 Attempt to optimise the insane amount of time it takes to get the user home list. Currently 24s for 'rem'.
The old code would make one query for all the urls and revisions, then
loop and individual query each bin. If the user has 100+ bins, then it
gets slow and expensive because we can't group these queries together.

I've changed this so that the query simply joins the owners and sandbox
table, so instead of *just* getting the url and revision as previously,
we're now getting all the data in one request.  I've also removed the
sorting as this happens entirely in the code.

The query, live for my own homepage is 1.13 seconds. I'm hoping
therefore the sum change of this update will reduce the 24 seconds down
to 1-2 seconds.

One additional change I'd like would be to only make the request for
the `/list` page if the user really goes there, or perhaps hovers over
their home link - as a preemptive request - so we're not always making
the request for their home urls.
2012-09-01 08:34:56 +01:00
Jon Linklater-Johnson
cfa3aa3b6d Flag abuse was missing 5626d3942ad99acaa810e426557239ec8dc2495a - so I cherry-picked it back in and resolved the conflict 2012-08-25 19:36:20 +01:00
Remy Sharp
2b2bf82a59 Merge pull request #299 from remy/feature/unicode
Support additional unicode characters
2012-08-24 01:34:01 -07:00
Remy Sharp
a4eb247ad4 Support log in using email as well as username. Fixes #314 2012-08-21 23:16:06 +01:00
Remy Sharp
40137a170c Create revision correctly updates "last_updated" making it set to /[user]/last/ 2012-08-21 13:59:27 +01:00
Aron Carroll
159b40c177 Set the charset of the database on connection
This is part of the work needed to support the supplementary unicode
characters as described in #278.
2012-08-10 12:39:37 +01:00
Aron Carroll
d9c2cd4a83 Lint the node source 2012-08-03 13:04:48 +01:00
Aron Carroll
17f176a324 Add Store#upgradeUserKey() method 2012-07-23 23:02:18 +01:00
Aron Carroll
8cd8867583 Pass template params in correct order in Store#touchLogin()
Was preventing the last_login column from being updated correctly.
2012-07-23 23:02:18 +01:00
Remy Sharp
9260c890c8 Fixed restoring panel processors - hopefully for the last time! 2012-07-22 23:54:29 +01:00
Remy Sharp
b1efeb9e0f Force in default settings value - should really be in DB, but this is the defaults function, right? 2012-07-22 20:32:16 +01:00
Remy Sharp
c679f8e107 JSON translate appears to happen by default 2012-07-22 19:30:29 +01:00
Remy Sharp
57ff9cdda3 Capture processor on first save and milestones. Also disable code casting until bin is owned. 2012-07-22 11:55:22 +01:00
Remy Sharp
545166b315 Setting settings inside db modules - feels wrong I'm duping code. 2012-07-21 16:03:18 +01:00
Remy Sharp
c71835a72b BOOM. Closes #176
Now just need @aron to implement server side rendering so the previews
work now (that I've broken them with this support! :)
2012-07-13 17:56:49 +01:00
Remy Sharp
90065b9450 Update last_updated col on owners so that /rem/last always points to last active (includes db change) 2012-07-08 00:25:45 +01:00
Aron Carroll
54f1dbc86a Remove incorrect "not-found" error. Ticket #213 2012-07-07 20:00:27 +01:00
Aron Carroll
064d1a5751 Using utils.inherit() in MySQL adapter 2012-07-06 17:44:29 +01:00
Aron Carroll
69e208afde Update SQLite adapter to use sql_templates.json
This is completely untested. Please don't hurt me if it doesn't work!
2012-07-06 17:20:18 +01:00
Aron Carroll
29bdb842c3 Remove all instances of NOW() from the sql templates 2012-07-06 17:12:25 +01:00
Remy Sharp
57ce5ec7ac Allow user to use permalink /rem/last for easy device testing 2012-07-05 00:26:14 +01:00
Remy Sharp
f0624339e1 Pushing in @aron's changes from #190 2012-06-27 16:20:15 +01:00
Aron Carroll
de04505b8b Now apply default values to the database results if null
This allows us to assume that the HTML, CSS and JavaScript will always
be a string.
2012-06-10 14:05:47 +01:00
Remy Sharp
d0f628acf0 JS Bin would hang if this was the user's first ever login - yoinks! 2012-05-26 10:29:09 +01:00
Aron Carroll
61693f984d Add support for fetching user bins to the store 2012-05-18 15:49:47 +01:00
Aron Carroll
f6980cee25 Created bins are now assigned to user account when logged in 2012-05-09 21:57:34 +01:00
Aron Carroll
156d6d1c18 Now upgrade passwords from old JSBin accounts to new ones 2012-05-06 19:07:41 +01:00
Aron Carroll
a5811c6af9 Update "last_login" column when a user logs in 2012-05-06 18:45:48 +01:00
Aron Carroll
8b90176308 Add user methods to the store and MySQL adapter 2012-05-05 19:35:11 +01:00
Aron Carroll
f3ea6fe9e7 Now correctly checking for updated rows in mysql.js 2012-05-03 20:56:17 +01:00
Aron Carroll
20a7ea5b3c Add support for saving a bin revision
Support is still very basic but a revision can be created, streaming
is not yet supported as we are waiting on sessions.
2012-04-22 19:00:07 +01:00
Aron Carroll
6d288d84e3 Add ability to create new bins 2012-04-20 19:06:07 +01:00
Aron Carroll
38b6728d72 Fix a couple of issues in the bin code generator 2012-04-20 17:28:29 +01:00
Aron Carroll
24a96c9567 Add code for generating a new bin id 2012-04-20 17:23:27 +01:00