Use uploads table

This commit is contained in:
Jacob Gunther 2018-04-15 23:16:39 -05:00
parent dc0f151a7f
commit 830dc1bc43
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class RethinkDBStore {
} }
set(key, data, callback) { set(key, data, callback) {
this.client.table('pastes').insert({ id: RethinkDBStore.md5(key), data: data }).run((error) => { this.client.table('uploads').insert({ id: RethinkDBStore.md5(key), data: data }).run((error) => {
if (error) { if (error) {
callback(false); callback(false);
winston.error('failed to insert to table', error); winston.error('failed to insert to table', error);
@ -26,7 +26,7 @@ class RethinkDBStore {
} }
get(key, callback) { get(key, callback) {
this.client.table('pastes').get(RethinkDBStore.md5(key)).run((error, result) => { this.client.table('uploads').get(RethinkDBStore.md5(key)).run((error, result) => {
if (error || !result) { if (error || !result) {
callback(false); callback(false);
winston.error('failed to insert to table', error); winston.error('failed to insert to table', error);