feat: end to end api type safety with redis rate limiting (#573)
* feat: support hono rpc * add wrangler file * update name of wrangler file * add wrangler as a dependency * add compatibility_flags * trigger ci * core: add health check to docker file * expose port 80 * update custom healthcheck * feat: implement openapi * install dependencies in root * debug yml * update yml * update port * update dockerfile with envs * completely move away from apiClient * rename backend to api * refactor: update server descriptions and comment out local spec saving * update lock file * use api.classroomio.com * add support for redis * fix: add missing line break in WelcomeModal.svelte * refactor: remove wrangler configuration and update Vite config for API integration
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { classroomio } from '$lib/utils/services/api';
|
||||
|
||||
const sendEmail = (sFetch: typeof fetch) => {
|
||||
return async (
|
||||
@@ -12,13 +12,10 @@ const sendEmail = (sFetch: typeof fetch) => {
|
||||
}[]
|
||||
) => {
|
||||
try {
|
||||
const response = await sFetch(`${env.PUBLIC_SERVER_URL}/mail/send`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(emailDataArray)
|
||||
});
|
||||
const response = await classroomio.mail.send.$post(
|
||||
{ json: emailDataArray },
|
||||
{ fetch: sFetch }
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
console.log('Failed to send emails');
|
||||
|
||||
Reference in New Issue
Block a user