- import 구문 스타일 수정
- 첫 번째 배열 값 변경 - 불필요한 조건 및 중복 코드 제거
This commit is contained in:
parent
9f3cb0be3e
commit
78517042b4
13
index.js
13
index.js
@ -1,7 +1,7 @@
|
||||
import fetch from 'node-fetch';
|
||||
import postgres from 'postgres';
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import { pgTable, text } from 'drizzle-orm/pg-core';
|
||||
import {drizzle} from 'drizzle-orm/postgres-js';
|
||||
import {pgTable, text} from 'drizzle-orm/pg-core';
|
||||
|
||||
// PostgreSQL 데이터베이스 연결 설정
|
||||
const sql = postgres({
|
||||
@ -155,14 +155,11 @@ const niceTable = pgTable('nice', {
|
||||
|
||||
async function main() {
|
||||
const baseUrl = 'https://nice.kegorii.workers.dev/get?t=';
|
||||
const firstArray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'H', 'I', 'J', 'L', 'M', 'N', 'O', 'P', 'Q'];
|
||||
const firstArray = ['S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
||||
for (let i = 0; i < firstArray.length; i++) {
|
||||
let secondArray = [];
|
||||
if (i >= 0 && i <= 9) {
|
||||
secondArray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
} else {
|
||||
secondArray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
||||
}
|
||||
for (let x = 0; x < secondArray.length; x++) {
|
||||
for (let y = 0; y < 1000; y++) {
|
||||
const rtnval = y.toString().padStart(3, '0');
|
||||
@ -194,6 +191,6 @@ async function main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
main();
|
||||
Loading…
x
Reference in New Issue
Block a user