add forceRefresh=true when call gtoken.getToken by @iwestlin
This commit is contained in:
		
							parent
							
								
									5b67053077
								
							
						
					
					
						commit
						cbcdeb52e8
					
				@ -27,3 +27,10 @@ CREATE UNIQUE INDEX "task_source_target" ON "task" (
 | 
				
			|||||||
  "source",
 | 
					  "source",
 | 
				
			||||||
  "target"
 | 
					  "target"
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE TABLE "copied" (
 | 
				
			||||||
 | 
					  "taskid"  INTEGER,
 | 
				
			||||||
 | 
					  "fileid"  TEXT
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE INDEX "copied_taskid" ON "copied" ("taskid");
 | 
				
			||||||
							
								
								
									
										14
									
								
								db.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								db.js
									
									
									
									
									
								
							@ -3,3 +3,17 @@ const db_location = path.join(__dirname, 'gdurl.sqlite')
 | 
				
			|||||||
const db = require('better-sqlite3')(db_location)
 | 
					const db = require('better-sqlite3')(db_location)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = { db }
 | 
					module.exports = { db }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					create_table_copied()
 | 
				
			||||||
 | 
					function create_table_copied () {
 | 
				
			||||||
 | 
					  const [exists] = db.prepare('PRAGMA table_info(copied)').all()
 | 
				
			||||||
 | 
					  // console.log('exists', exists)
 | 
				
			||||||
 | 
					  if (exists) return
 | 
				
			||||||
 | 
					  const create_table = `CREATE TABLE "copied" (
 | 
				
			||||||
 | 
					  "taskid"  INTEGER,
 | 
				
			||||||
 | 
					  "fileid"  TEXT
 | 
				
			||||||
 | 
					)`
 | 
				
			||||||
 | 
					  db.prepare(create_table).run()
 | 
				
			||||||
 | 
					  const create_index = `CREATE INDEX "copied_taskid" ON "copied" ("taskid");`
 | 
				
			||||||
 | 
					  db.prepare(create_index).run()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user