Storyweavermain.tsx1 match
45formData.append('previousStory', JSON.stringify(storyParts.parts));
46
47const response = await fetch('/generate-story', {
48method: 'POST',
49body: formData
blob_adminmain.tsx23 matches
234const [isDragging, setIsDragging] = useState(false);
235236const fetchBlobs = useCallback(async () => {
237setLoading(true);
238try {
239const response = await fetch(`/api/blobs?prefix=${encodeKey(searchPrefix)}&limit=${limit}`);
240const data = await response.json();
241setBlobs(data);
242} catch (error) {
243console.error("Error fetching blobs:", error);
244} finally {
245setLoading(false);
248249useEffect(() => {
250fetchBlobs();
251}, [fetchBlobs]);
252253const handleSearch = (e) => {
264setBlobContentLoading(true);
265try {
266const response = await fetch(`/api/blob?key=${encodeKey(clickedBlob.key)}`);
267const content = await response.text();
268setSelectedBlob({ ...clickedBlob, key: decodeKey(clickedBlob.key) });
269setEditContent(content);
270} catch (error) {
271console.error("Error fetching blob content:", error);
272} finally {
273setBlobContentLoading(false);
278const handleSave = async () => {
279try {
280await fetch(`/api/blob?key=${encodeKey(selectedBlob.key)}`, {
281method: "PUT",
282body: editContent,
290const handleDelete = async (key) => {
291try {
292await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
293setBlobs(blobs.filter(b => b.key !== key));
294if (selectedBlob && selectedBlob.key === key) {
307const key = `${searchPrefix}${file.name}`;
308formData.append("key", encodeKey(key));
309await fetch("/api/blob", { method: "POST", body: formData });
310const newBlob = { key, size: file.size, lastModified: new Date().toISOString() };
311setBlobs([newBlob, ...blobs]);
315}
316}
317fetchBlobs();
318};
319329try {
330const fullKey = `${searchPrefix}${key}`;
331await fetch(`/api/blob?key=${encodeKey(fullKey)}`, {
332method: "PUT",
333body: "",
344const handleDownload = async (key) => {
345try {
346const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
347const blob = await response.blob();
348const url = window.URL.createObjectURL(blob);
363if (newKey && newKey !== oldKey) {
364try {
365const response = await fetch(`/api/blob?key=${encodeKey(oldKey)}`);
366const content = await response.blob();
367await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
368method: "PUT",
369body: content,
370});
371await fetch(`/api/blob?key=${encodeKey(oldKey)}`, { method: "DELETE" });
372setBlobs(blobs.map(b => b.key === oldKey ? { ...b, key: newKey } : b));
373if (selectedBlob && selectedBlob.key === oldKey) {
383const newKey = `__public/${key}`;
384try {
385const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
386const content = await response.blob();
387await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
388method: "PUT",
389body: content,
390});
391await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
392setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
393if (selectedBlob && selectedBlob.key === key) {
402const newKey = key.slice(9); // Remove "__public/" prefix
403try {
404const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
405const content = await response.blob();
406await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
407method: "PUT",
408body: content,
409});
410await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
411setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
412if (selectedBlob && selectedBlob.key === key) {
822});
823824export default lastlogin((request: Request) => app.fetch(request));
3536async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38method: "POST",
39headers: {
5051async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53method: "POST",
54headers: {
decisiveRoseFelidaemain.tsx6 matches
1516useEffect(() => {
17async function fetchWeather() {
18try {
19const response = await fetch(
20`https://api.open-meteo.com/v1/forecast?latitude=${location.latitude}&longitude=${location.longitude}¤t_weather=true&hourly=temperature_2m,relativehumidity_2m,windspeed_10m,weathercode`
21);
24setError('');
25} catch (error) {
26console.error("Weather fetch failed", error);
27setError('Failed to fetch weather data');
28}
29}
30fetchWeather();
31}, [location]);
3270
71try {
72const geoResponse = await fetch(
73`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(locationInput)}&count=1&language=en&format=json`
74);
scarletSolemain.tsx2 matches
32url: "https://d000d.com/e/pklnjh0gnnou",
33};
34const req = await fetch("http://turnstileTest.pythonanywhere.com/solve", {
35method: "POST",
36headers: { "Content-Type": "application/json" },
63return c.json({ worked: true });
64});
65export default app.fetch;
switchExtractormain.tsx1 match
7"rapid-cloud.tv": "https://rapid-cloud.co/js/player/prod/e6-player-v2-debug.min.js",
8};
9const req = await fetch(site["megacloud.tv"]);
10const str = await req.text();
11let m;
scraper_templatemain.tsx1 match
9const variable: string = await blob.getJSON(blobKey) ?? "";
1011const response = await fetch(scrapeURL);
12const body = await response.text();
13const $ = cheerio.load(body);
3536async function execute(statement: InStatement): Promise<ResultSet> {
37const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38method: "POST",
39headers: {
4950async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
51const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
52method: "POST",
53headers: {
1007app.get("/", (c) => c.html(html));
10081009// Export app.fetch for Val Town, otherwise export app
1010export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;
1011
blob_adminmain.tsx22 matches
233const [isDragging, setIsDragging] = useState(false);
234235const fetchBlobs = useCallback(async () => {
236setLoading(true);
237try {
238const response = await fetch(`/api/blobs?prefix=${encodeKey(searchPrefix)}&limit=${limit}`);
239const data = await response.json();
240setBlobs(data);
241} catch (error) {
242console.error("Error fetching blobs:", error);
243} finally {
244setLoading(false);
247248useEffect(() => {
249fetchBlobs();
250}, [fetchBlobs]);
251252const handleSearch = (e) => {
263setBlobContentLoading(true);
264try {
265const response = await fetch(`/api/blob?key=${encodeKey(clickedBlob.key)}`);
266const content = await response.text();
267setSelectedBlob({ ...clickedBlob, key: decodeKey(clickedBlob.key) });
268setEditContent(content);
269} catch (error) {
270console.error("Error fetching blob content:", error);
271} finally {
272setBlobContentLoading(false);
277const handleSave = async () => {
278try {
279await fetch(`/api/blob?key=${encodeKey(selectedBlob.key)}`, {
280method: "PUT",
281body: editContent,
289const handleDelete = async (key) => {
290try {
291await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
292setBlobs(blobs.filter(b => b.key !== key));
293if (selectedBlob && selectedBlob.key === key) {
306const key = `${searchPrefix}${file.name}`;
307formData.append("key", encodeKey(key));
308await fetch("/api/blob", { method: "POST", body: formData });
309const newBlob = { key, size: file.size, lastModified: new Date().toISOString() };
310setBlobs([newBlob, ...blobs]);
314}
315}
316fetchBlobs();
317};
318328try {
329const fullKey = `${searchPrefix}${key}`;
330await fetch(`/api/blob?key=${encodeKey(fullKey)}`, {
331method: "PUT",
332body: "",
343const handleDownload = async (key) => {
344try {
345const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
346const blob = await response.blob();
347const url = window.URL.createObjectURL(blob);
362if (newKey && newKey !== oldKey) {
363try {
364const response = await fetch(`/api/blob?key=${encodeKey(oldKey)}`);
365const content = await response.blob();
366await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
367method: "PUT",
368body: content,
369});
370await fetch(`/api/blob?key=${encodeKey(oldKey)}`, { method: "DELETE" });
371setBlobs(blobs.map(b => b.key === oldKey ? { ...b, key: newKey } : b));
372if (selectedBlob && selectedBlob.key === oldKey) {
382const newKey = `__public/${key}`;
383try {
384const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
385const content = await response.blob();
386await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
387method: "PUT",
388body: content,
389});
390await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
391setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
392if (selectedBlob && selectedBlob.key === key) {
401const newKey = key.slice(9); // Remove "__public/" prefix
402try {
403const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
404const content = await response.blob();
405await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
406method: "PUT",
407body: content,
408});
409await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
410setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
411if (selectedBlob && selectedBlob.key === key) {