Skip to content

Commit

Permalink
fix function name
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Jul 15, 2024
1 parent 31eeb59 commit 0f47037
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const update = onRequest({ cors: true }, async (req, res) => {
}
});

const load = async (
const _load = async (
collection: 'signed' | 'unsigned',
uid: string,
res: functions.Response,
Expand All @@ -133,22 +133,22 @@ const load = async (
}
};

export const loadUnsigned = onRequest({ cors: true }, async (req, res) => {
export const read = onRequest({ cors: true }, async (req, res) => {
if (req.method !== 'POST') {
res.status(405).send('Method Not Allowed');
return;
}
const { uid } = req.body;
await load('unsigned', uid, res);
await _load('unsigned', uid, res);
});

export const loadSigned = onRequest(async (req, res) => {
export const fetch = onRequest(async (req, res) => {
if (req.method !== 'POST') {
res.status(405).send('Method Not Allowed');
return;
}
const { uid } = req.body;
await load('signed', uid, res);
await _load('signed', uid, res);
});

const deleteOldDataFromCollection = async (
Expand Down
2 changes: 1 addition & 1 deletion src/component/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Loading = () => {
const { q: uid } = queryString.parse(window.location.search) as {
q: string;
};
fetch('https://loadunsigned-jx4b2hndxq-uc.a.run.app', {
fetch('https://read-jx4b2hndxq-uc.a.run.app', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 0f47037

Please sign in to comment.