Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikthepixel committed Jan 19, 2024
1 parent 902c4e0 commit b622edb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,8 @@ export default class KnexAdvertisementRepository

async update(uidOrId: UidOrId, ad: UpdatableAdvertisement): Promise<void> {
await this.db
.table(this.table + ' as ads')
.where(
`ads.${getType(uidOrId)}`,
castUidOrId(uidOrId, this.db.fn.uuidToBin),
)
.table(this.table)
.where(getType(uidOrId), castUidOrId(uidOrId, this.db.fn.uuidToBin))
.update(ad);
}

Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/src/pages/profile/finish/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default function FinishProfilePage() {
const { getInputProps, onSubmit } = useForm<FinishProfileRequest>({
validate: zodResolver(finishProfileRequestSchema),
validateInputOnChange: true,
initialValues: {
username: '',
default_currency: 'EUR',
},
});

if (status === 'complete') {
Expand Down
2 changes: 0 additions & 2 deletions apps/frontend/src/stores/useAdvertisementEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ const useAdvertisementEditor = create<AdvertisementEditorState>((set, get) => ({
})
: [];

console.log(uploadedImages)

await putAdvertisement(ad.uid, {
...edited,
images: [...uploadedImages, ...images],
Expand Down
3 changes: 3 additions & 0 deletions knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const config = Object.fromEntries(
database: localEnvVariables.DATABASE_NAME,
user: localEnvVariables.DATABASE_USER,
password: localEnvVariables.DATABASE_PASSWORD,
ssl: {
rejectUnauthorized: false,
},
},
migrations,
seeds
Expand Down

0 comments on commit b622edb

Please sign in to comment.