Skip to content

Commit

Permalink
fix: get my task only in repo with issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wfnuser committed Jul 18, 2024
1 parent d06d034 commit 61561d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/mytask/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ export default function MyTask() {
setLoading(true)

try {
// const projectsData = await fetch(`/api/projects?org=${org}`).then((res) => res.json())
const projects = await fetch('/api/projects?org=youbetdao')
.then((res) => res.json())
.catch(() => [])

const filteredProjects = projects.filter((item: Repository) => item.open_issues_count > 0)
let allTasks: Issue[] = []

const tasksPromises = projects.map(async (project: Repository) => {
const tasksPromises = filteredProjects.map(async (project: Repository) => {
const projectTasks = await fetch(
`/api/tasks?org=${org}&project=${project.name}&assignee=${Cookies.get('username')}`,
)
Expand Down

0 comments on commit 61561d1

Please sign in to comment.