Update skills: add website-creator, mql-developer, ecommerce-astro

Changes:
- Add FAL_KEY and GEMINI_API_KEY to .env.example
- Update picture-it to use ~/.config/opencode/.env (unified creds)
- Remove shodh-memory skill (no longer used)
- Remove alphaear-* skills (deprecated)
- Remove thai-frontend-dev skill (replaced by website-creator)
- Remove theme-factory skill
- Add mql-developer skill (MQL5 trading)
- Add ecommerce-astro skill (Astro e-commerce)
- Add website-creator skill (Next.js + Payload CMS)
- Update install script for new skills
This commit is contained in:
2026-04-16 17:40:27 +07:00
parent 5053ccdba2
commit b26c8199a5
562 changed files with 59030 additions and 37600 deletions

View File

@@ -0,0 +1,66 @@
import type { APIRoute } from 'astro';
import { supabaseAdmin } from '../../../../lib/supabase';
import { getTokenFromHeader, verifyToken } from '../../../../lib/auth';
export const GET: APIRoute = async ({ request }) => {
try {
// Extract token from Authorization header
const authHeader = request.headers.get('authorization');
const token = getTokenFromHeader(authHeader);
if (!token) {
return new Response(JSON.stringify({ error: 'No authentication token provided' }), {
status: 401,
headers: { 'Content-Type': 'application/json' }
});
}
// Verify token
const payload = verifyToken(token);
if (!payload) {
return new Response(JSON.stringify({ error: 'Invalid or expired token' }), {
status: 401,
headers: { 'Content-Type': 'application/json' }
});
}
// Get user from database
const { data: user, error: userError } = await supabaseAdmin
.from('users')
.select('id, email, name, role, avatar_url, phone, created_at')
.eq('id', payload.userId)
.single();
if (userError || !user) {
return new Response(JSON.stringify({ error: 'User not found' }), {
status: 404,
headers: { 'Content-Type': 'application/json' }
});
}
return new Response(JSON.stringify({
success: true,
user: {
id: user.id,
email: user.email,
name: user.name,
role: user.role,
avatar_url: user.avatar_url,
phone: user.phone,
created_at: user.created_at
}
}), {
status: 200,
headers: { 'Content-Type': 'application/json' }
});
} catch (error) {
console.error('Me error:', error);
return new Response(JSON.stringify({
error: error instanceof Error ? error.message : 'Internal server error'
}), {
status: 500,
headers: { 'Content-Type': 'application/json' }
});
}
};