このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
import {error, json} from '@sveltejs/kit';
import fetch from 'node-fetch';
/** @type {import('./$types').RequestHandler} */
export async function GET({ url }) {
const Url = url.searchParams.get('url');
console.log(Url);
const res = await fetch(Url+"/.well-known/nodeinfo");
const data = await res.json();
const res2 = await fetch(data.links[0].href)
const data2 = await res2.json();
console.log(data2.software.name);
return json({"url":true,"software":data2.software.name});
}
svelte以外でも単純なのでexpressとかに移植するのは簡単だと思う
RE: https://mattyaski.co/notes/9cxrvgmzd3
https://actv-pub-soft-chk.mattya.workers.dev/ に
https://actv-pub-soft-chk.mattya.workers.dev/?url=https://mattyaski.co
のようにgetリクエストを投げるとなんかmisskeyかとかmastodonかとかわかるもの作ったかも
エラーハンドリング?ってのがわからなくてエラー履いちゃうかも....
https://actv-pub-soft-chk.mattya.workers.dev/ に
https://actv-pub-soft-chk.mattya.workers.dev/?url=https://mattyaski.co
のようにgetリクエストを投げるとなんかmisskeyかとかmastodonかとかわかるもの作ったかも
エラーハンドリング?ってのがわからなくてエラー履いちゃうかも....
https://actv-pub-soft-chk.mattya.workers.dev/ に
https://actv-pub-soft-chk.mattya.workers.dev/?url=https://mattyaski.co
のようにgetリクエストを投げるとなんかmisskeyかとかmastodonかとかわかるもの作ったかも
エラーハンドリング?ってのがわからなくてエラー履いちゃうかも....
@WAKASAGI 僕ができる最大限の子としてこれかも
僕のファイル鯖を導入した時期より前の画像が読み込めてないのでわからないとしか...
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
redmi 9t発売当初から使っているのだけどもバッテリー死んできて普通のスマホよりちょっと持つくらいになってしまった
fbi open up!!!!!!
RE: https://mattyaski.co/notes/9cagdvmx0o