Skip to content

Commit

Permalink
run prettier, check tests all passing
Browse files Browse the repository at this point in the history
  • Loading branch information
KCCPMG committed Oct 22, 2024
1 parent 245758f commit bf37168
Show file tree
Hide file tree
Showing 47 changed files with 1,017 additions and 1,017 deletions.
8 changes: 4 additions & 4 deletions src/backend/auth/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { InsertObject, Selectable } from "kysely";

const mapStoredUserToAdapterUser = (
user: Selectable<ZapatosTableNameToKyselySchema<"user">>,
user: Selectable<ZapatosTableNameToKyselySchema<"user">>
): AdapterUser => ({
id: user.user_id,
email: user.email,
Expand All @@ -17,7 +17,7 @@ const mapStoredUserToAdapterUser = (
});

const mapStoredSessionToAdapterSession = (
session: Selectable<ZapatosTableNameToKyselySchema<"session">>,
session: Selectable<ZapatosTableNameToKyselySchema<"session">>
): AdapterSession => ({
sessionToken: session.session_token,
userId: session.user_id,
Expand All @@ -32,7 +32,7 @@ const mapStoredSessionToAdapterSession = (
* See https://next-auth.js.org/tutorials/creating-a-database-adapter
*/
export const createPersistedAuthAdapter = (
db: KyselyDatabaseInstance,
db: KyselyDatabaseInstance
): Adapter => ({
async createUser(user) {
const numOfUsers = await db
Expand Down Expand Up @@ -149,7 +149,7 @@ export const createPersistedAuthAdapter = (
.insertInto("account")
.values(data)
.onConflict((b) =>
b.columns(["provider_name", "provider_account_id"]).doUpdateSet(data),
b.columns(["provider_name", "provider_account_id"]).doUpdateSet(data)
)
.execute();
},
Expand Down
2 changes: 1 addition & 1 deletion src/backend/auth/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { KyselyDatabaseInstance } from "../lib";
import type { NextAuthOptions } from "next-auth";

export const getNextAuthOptions = (
db: KyselyDatabaseInstance,
db: KyselyDatabaseInstance
): NextAuthOptions => ({
providers: [
GoogleProvider({
Expand Down
4 changes: 2 additions & 2 deletions src/backend/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type tRPCContext = ReturnType<typeof getDb> & {
};

export const createContext = async (
options: CreateNextContextOptions,
options: CreateNextContextOptions
): Promise<tRPCContext> => {
const env = (options.req.env as unknown as Env) ?? process.env;
const {
Expand All @@ -40,7 +40,7 @@ export const createContext = async (
const session = await getServerSession(
options.req,
options.res,
getNextAuthOptions(db),
getNextAuthOptions(db)
);
if (session && session.user?.email) {
const user = await db
Expand Down
4 changes: 2 additions & 2 deletions src/backend/db/lib/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interface MigrateOptions {

export const migrate = async (
databaseUrl: string,
{ silent = false, shouldGenerateTypes = true }: MigrateOptions = {},
{ silent = false, shouldGenerateTypes = true }: MigrateOptions = {}
) => {
const migrationsDirectory = path.join(
process.cwd(),
"src/backend/db/migrations",
"src/backend/db/migrations"
);
const zapatosDirectory = path.join(process.cwd(), "src/backend/db");

Expand Down
2 changes: 1 addition & 1 deletion src/backend/db/lib/seed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test("seedfile works with current schema", async (t) => {
t.fail(
`Seedfile execution failed: ${
error instanceof Error ? error.message : String(error)
}`,
}`
);
} finally {
await db.destroy();
Expand Down
Loading

0 comments on commit bf37168

Please sign in to comment.