const common_1 = require("@nestjs/common");
const postgres_js_1 = require("drizzle-orm/postgres-js");
const postgres_1 = require("postgres");
const schema = require("../../schema");
let UsersService = class UsersService {
async getAll() {
const client = (0, postgres_1.default)('postgres://root:root@postgres:5432/testing', { // PROBLEM!!
ssl: false,
});
const db = (0, postgres_js_1.drizzle)(client, { schema });
const users = await db.select().from(schema.users);
return users;
}
};
const common_1 = require("@nestjs/common");
const postgres_js_1 = require("drizzle-orm/postgres-js");
const postgres_1 = require("postgres");
const schema = require("../../schema");
let UsersService = class UsersService {
async getAll() {
const client = (0, postgres_1.default)('postgres://root:root@postgres:5432/testing', { // PROBLEM!!
ssl: false,
});
const db = (0, postgres_js_1.drizzle)(client, { schema });
const users = await db.select().from(schema.users);
return users;
}
};