Skip to content

Add GET /api/apps endpoint to dev server#20

Draft
Copilot wants to merge 2 commits intofeat/personal-sitefrom
copilot/sub-pr-13-please-work
Draft

Add GET /api/apps endpoint to dev server#20
Copilot wants to merge 2 commits intofeat/personal-sitefrom
copilot/sub-pr-13-please-work

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The dev server lacked a GET /api/apps endpoint, causing 404s when the client fetched app data for the directory display and autocomplete in submission forms.

Changes

  • Added GET /api/apps endpoint to server/dev-server.js that returns all apps from the database
  • Imported apps schema from src/db/schema.ts
// GET /api/apps
app.get('/api/apps', async (req, res) => {
  try {
    const allApps = await db
      .select()
      .from(apps);

    res.json({ apps: allApps });
  } catch (error) {
    console.error('Database error:', error);
    res.status(500).json({
      error: 'Internal server error',
      details: error.message
    });
  }
});

The endpoint matches the response format expected by App.tsx and AppSubmissionForm.tsx.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI mentioned this pull request Feb 12, 2026
@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
string-v2 Ready Ready Preview, Comment Feb 12, 2026 4:09pm

Co-authored-by: ghostleek <44336310+ghostleek@users.noreply.github.com>
Copilot AI changed the title [WIP] Work in progress to address PR #13 feedback Add GET /api/apps endpoint to dev server Feb 12, 2026
Copilot AI requested a review from ghostleek February 12, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants