Compare commits
No commits in common. "b0fc52ade46ca3ba8ce7e473b02d3038597c192a" and "f24b23070390b83bbcb0349adc5fd9e04376cf7b" have entirely different histories.
b0fc52ade4
...
f24b230703
@ -70,9 +70,6 @@ A unified CLI that covers all API operations.
|
||||
# List all projects
|
||||
./scripts/gantt.sh project list
|
||||
|
||||
# Get specific project
|
||||
./scripts/gantt.sh project get <project-id>
|
||||
|
||||
# Create project
|
||||
./scripts/gantt.sh project create "Project Name" "Description" "#color"
|
||||
|
||||
@ -92,9 +89,6 @@ A unified CLI that covers all API operations.
|
||||
# List all sprints
|
||||
./scripts/gantt.sh sprint list
|
||||
|
||||
# Get specific sprint
|
||||
./scripts/gantt.sh sprint get <sprint-id>
|
||||
|
||||
# Create sprint
|
||||
./scripts/gantt.sh sprint create "Sprint 2" <project-id> "2026-02-23" "2026-03-01" "Sprint goal"
|
||||
|
||||
@ -224,12 +218,10 @@ Displays text files in terminal, saves binary files to `/tmp/`.
|
||||
| Add comment | ✅ | ✅ | ❌ |
|
||||
| Attach file | ✅ | ✅ | ✅ |
|
||||
| List projects | ✅ | ✅ | ❌ |
|
||||
| Get project | ✅ | ✅ | ❌ |
|
||||
| Create project | ✅ | ✅ | ❌ |
|
||||
| Update project | ✅ | ✅ | ❌ |
|
||||
| Delete project | ✅ | ✅ | ❌ |
|
||||
| List sprints | ✅ | ✅ | ❌ |
|
||||
| Get sprint | ✅ | ✅ | ❌ |
|
||||
| Create sprint | ✅ | ✅ | ❌ |
|
||||
| Update sprint | ✅ | ✅ | ❌ |
|
||||
| Delete sprint | ✅ | ✅ | ❌ |
|
||||
|
||||
@ -295,18 +295,6 @@ cmd_project_list() {
|
||||
api_call GET "/projects" | jq '.projects'
|
||||
}
|
||||
|
||||
cmd_project_get() {
|
||||
local project_id="$1"
|
||||
|
||||
if [ -z "$project_id" ]; then
|
||||
log_error "Usage: project get <project-id>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_info "Fetching project $project_id..."
|
||||
api_call GET "/projects/$project_id" | jq '.project'
|
||||
}
|
||||
|
||||
cmd_project_create() {
|
||||
local name="$1"
|
||||
local description="${2:-}"
|
||||
@ -363,18 +351,6 @@ cmd_sprint_list() {
|
||||
api_call GET "/sprints" | jq '.sprints'
|
||||
}
|
||||
|
||||
cmd_sprint_get() {
|
||||
local sprint_id="$1"
|
||||
|
||||
if [ -z "$sprint_id" ]; then
|
||||
log_error "Usage: sprint get <sprint-id>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_info "Fetching sprint $sprint_id..."
|
||||
api_call GET "/sprints/$sprint_id" | jq '.sprint'
|
||||
}
|
||||
|
||||
cmd_sprint_create() {
|
||||
local name="$1"
|
||||
local project_id="$2"
|
||||
@ -654,7 +630,6 @@ TASK COMMANDS:
|
||||
|
||||
PROJECT COMMANDS:
|
||||
project list List all projects
|
||||
project get <id> Get specific project
|
||||
project create <name> [desc] [color]
|
||||
Create new project
|
||||
project update <id> <field> <val>
|
||||
@ -664,7 +639,6 @@ PROJECT COMMANDS:
|
||||
|
||||
SPRINT COMMANDS:
|
||||
sprint list List all sprints
|
||||
sprint get <id> Get specific sprint
|
||||
sprint create <name> <project-id> [start] [end] [goal]
|
||||
Create new sprint
|
||||
sprint update <id> <field> <val>
|
||||
@ -753,7 +727,6 @@ main() {
|
||||
shift || true
|
||||
case "$subcmd" in
|
||||
list|ls) cmd_project_list "$@" ;;
|
||||
get|show) cmd_project_get "$@" ;;
|
||||
create|new|add) cmd_project_create "$@" ;;
|
||||
update|set|edit) cmd_project_update "$@" ;;
|
||||
delete|rm|remove) cmd_project_delete "$@" ;;
|
||||
@ -765,7 +738,6 @@ main() {
|
||||
shift || true
|
||||
case "$subcmd" in
|
||||
list|ls) cmd_sprint_list "$@" ;;
|
||||
get|show) cmd_sprint_get "$@" ;;
|
||||
create|new|add) cmd_sprint_create "$@" ;;
|
||||
update|set|edit) cmd_sprint_update "$@" ;;
|
||||
delete|rm|remove) cmd_sprint_delete "$@" ;;
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getServiceSupabase } from "@/lib/supabase/client";
|
||||
import { getAuthenticatedUser } from "@/lib/server/auth";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
// GET - fetch single project by ID
|
||||
export async function GET(
|
||||
request: Request,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
const user = await getAuthenticatedUser();
|
||||
if (!user) {
|
||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
|
||||
const { id } = await params;
|
||||
|
||||
const supabase = getServiceSupabase();
|
||||
const { data, error } = await supabase
|
||||
.from("projects")
|
||||
.select("*")
|
||||
.eq("id", id)
|
||||
.single();
|
||||
|
||||
if (error) {
|
||||
if (error.code === "PGRST116") {
|
||||
return NextResponse.json({ error: "Project not found" }, { status: 404 });
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
return NextResponse.json({ project: data });
|
||||
} catch (error) {
|
||||
console.error(">>> API GET /projects/[id] error:", error);
|
||||
return NextResponse.json({ error: "Failed to fetch project" }, { status: 500 });
|
||||
}
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getServiceSupabase } from "@/lib/supabase/client";
|
||||
import { getAuthenticatedUser } from "@/lib/server/auth";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
// GET - fetch single sprint by ID
|
||||
export async function GET(
|
||||
request: Request,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
const user = await getAuthenticatedUser();
|
||||
if (!user) {
|
||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
|
||||
const { id } = await params;
|
||||
|
||||
const supabase = getServiceSupabase();
|
||||
const { data, error } = await supabase
|
||||
.from("sprints")
|
||||
.select("*")
|
||||
.eq("id", id)
|
||||
.single();
|
||||
|
||||
if (error) {
|
||||
if (error.code === "PGRST116") {
|
||||
return NextResponse.json({ error: "Sprint not found" }, { status: 404 });
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
return NextResponse.json({ sprint: data });
|
||||
} catch (error) {
|
||||
console.error(">>> API GET /sprints/[id] error:", error);
|
||||
return NextResponse.json({ error: "Failed to fetch sprint" }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user