rubberduckies
rubberduckies
Explore posts from servers
DTDrizzle Team
Created by rubberduckies on 8/20/2024 in #help
trouble creating Enum
it appeared on migration yes
8 replies
DTDrizzle Team
Created by rubberduckies on 8/20/2024 in #help
trouble creating Enum
export const subscriptionPlanEnum = pgEnum('subscription_name', paymentPlansNames);
export const frequencyEnum = pgEnum('frequency', ['monthly', 'yearly']);
export const subscriptionPlanEnum = pgEnum('subscription_name', paymentPlansNames);
export const frequencyEnum = pgEnum('frequency', ['monthly', 'yearly']);
8 replies
DTDrizzle Team
Created by rubberduckies on 8/20/2024 in #help
trouble creating Enum
I forgot to export the enums
8 replies
DTDrizzle Team
Created by rubberduckies on 8/20/2024 in #help
trouble creating Enum
Thank you for the quick reply, i figured it out though
8 replies
HHono
Created by rubberduckies on 6/29/2024 in #help
middleware redirect from HTTPS to HTTP
thank you
5 replies
HHono
Created by rubberduckies on 6/29/2024 in #help
middleware redirect from HTTPS to HTTP
i'll look into it
5 replies
HHono
Created by rubberduckies on 6/29/2024 in #help
middleware redirect from HTTPS to HTTP
[UPDATE]: In the meantime, i realized i don't even have to make the redirects on ajax calls, as i can get the query string from referer, but my question still stands...
export const orgAndWebsiteMiddleware = async (c, next) => {
const { user, token } = c.var;
const referrer = c.req.header('referer');
const referrerUrl = referrer && new URL(c.req.header('referer'));
const org = c.req.query('org') || referrerUrl?.searchParams.get('org');
const ws = c.req.query('ws') || referrerUrl?.searchParams.get('ws');
...
}
export const orgAndWebsiteMiddleware = async (c, next) => {
const { user, token } = c.var;
const referrer = c.req.header('referer');
const referrerUrl = referrer && new URL(c.req.header('referer'));
const org = c.req.query('org') || referrerUrl?.searchParams.get('org');
const ws = c.req.query('ws') || referrerUrl?.searchParams.get('ws');
...
}
5 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
than you so much
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
that would be great
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
No description
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
No description
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
No description
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
this is also working...
app.get('/', (c) => {
const posted = getCookie(c, 'posted');
if (posted) return c.html(<h1>Posted</h1>);

return c.html(
<form method="POST">
<button type="submit">Submit</button>
</form>,
);
});

app.post('/', (c) => {
setCookie(c, 'posted', 'true');
return c.redirect('/');
});
app.get('/', (c) => {
const posted = getCookie(c, 'posted');
if (posted) return c.html(<h1>Posted</h1>);

return c.html(
<form method="POST">
<button type="submit">Submit</button>
</form>,
);
});

app.post('/', (c) => {
setCookie(c, 'posted', 'true');
return c.redirect('/');
});
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
with this, still working:
app.post('/', (c) => {
return c.redirect('/');
});
app.post('/', (c) => {
return c.redirect('/');
});
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
import { Hono } from 'hono';

const { ADMIN_PORT: PORT } = process.env;
const app = new Hono();

Bun.serve({
port: PORT,
reload: true,
fetch: app.fetch,
});

app.get('/', (c) => {
return c.html(
<form method="POST">
<button type="submit">Submit</button>
</form>,
);
});

app.post('/', (c) => {
return c.html(<h1>POSTED</h1>);
});

console.log('Admin app running on port', PORT);
import { Hono } from 'hono';

const { ADMIN_PORT: PORT } = process.env;
const app = new Hono();

Bun.serve({
port: PORT,
reload: true,
fetch: app.fetch,
});

app.get('/', (c) => {
return c.html(
<form method="POST">
<button type="submit">Submit</button>
</form>,
);
});

app.post('/', (c) => {
return c.html(<h1>POSTED</h1>);
});

console.log('Admin app running on port', PORT);
this is the simplest form, and it is working on safari also
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
give me a sec
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
i'm going to do something better
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
but i also tried with a fetch (using HTMX) and the result is the same
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
posting directly
57 replies
HHono
Created by rubberduckies on 6/26/2024 in #help
Problems with Form POST in Safari and IOS
No description
57 replies