delete unnecessary files
This commit is contained in:
		
							
								
								
									
										10
									
								
								db.txt
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								db.txt
									
									
									
									
									
								
							@@ -1,10 +0,0 @@
 | 
			
		||||
pastes:
 | 
			
		||||
  id
 | 
			
		||||
  uuid
 | 
			
		||||
  datetime
 | 
			
		||||
  language
 | 
			
		||||
  title
 | 
			
		||||
  paste
 | 
			
		||||
  hidden
 | 
			
		||||
  description
 | 
			
		||||
  (owner)
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
import db from "./sql";
 | 
			
		||||
 | 
			
		||||
export const getPaste = id => new Promise((resolve, reject) => {
 | 
			
		||||
  if(id | 0) {
 | 
			
		||||
    const query = "select p.uuid, p.stamp, p.title, p.paste, l.name as lang, r.uuid as reply from `pastes` as p "
 | 
			
		||||
                + "left join `languages` as l on l.id = p.lang "
 | 
			
		||||
                + "left join `pastes` as r on r.id = p.reply "
 | 
			
		||||
                + "where p.id = ?";
 | 
			
		||||
    db.exec(query, [id])
 | 
			
		||||
      .then(row => {
 | 
			
		||||
        resolve({
 | 
			
		||||
          uuid: row[0].uuid,
 | 
			
		||||
          stamp: row[0].stamp,
 | 
			
		||||
          title: row[0].title,
 | 
			
		||||
          paste: row[0].paste,
 | 
			
		||||
          lang: row[0].lang,
 | 
			
		||||
          reply: row[0].reply
 | 
			
		||||
        });
 | 
			
		||||
      })
 | 
			
		||||
      .catch(err => {
 | 
			
		||||
        reject(err);
 | 
			
		||||
      });
 | 
			
		||||
  }
 | 
			
		||||
  else {
 | 
			
		||||
    reject("NaN");
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user