Initial miaojingAI project with image resolution guard

This commit is contained in:
FengLee
2026-05-09 11:32:34 +08:00
commit d499020d4e
264 changed files with 54160 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
const base = 'http://127.0.0.1:5000';
(async () => {
const profileRes = await fetch(`${base}/api/profile?email=admin@example.com`);
const profileData = await profileRes.json();
const adminId = profileData.profile && profileData.profile.id;
if (!adminId) throw new Error('admin profile not found');
const token = `token-admin-${adminId}-${Date.now()}`;
const res = await fetch(`${base}/api/gallery`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({ ids: ['00000000-0000-0000-0000-000000000000'] }),
});
const body = await res.text();
console.log(JSON.stringify({ status: res.status, body }, null, 2));
})().catch((error) => {
console.error(error);
process.exit(1);
});