|
256 | 256 | ), |
257 | 257 | path("v1/<str:account_id>/projects", AccountProjectListAPI.as_view(), name="user_projects_api"), |
258 | 258 | path("v1/<str:account_id>/project-stats", ProjectStatsAPI.as_view(), name="projects_stat__api"), |
259 | | - # grantpicks sync |
260 | | - path("v1/projects/<int:project_id>/sync", ProjectSyncAPI.as_view(), name="project_sync_api"), |
261 | | - path("v1/projects/sync", ProjectsListSyncAPI.as_view(), name="projects_list_sync_api"), |
262 | | - path("v1/rounds/<int:round_id>/sync", RoundSyncAPI.as_view(), name="round_sync_api"), |
263 | | - path("v1/rounds/sync", RoundsListSyncAPI.as_view(), name="rounds_list_sync_api"), |
264 | | - path("v1/rounds/<int:round_id>/applications/sync", RoundApplicationsSyncAPI.as_view(), name="round_applications_sync_api"), |
265 | | - path("v1/rounds/<int:round_id>/applications/review/sync", ApplicationReviewSyncAPI.as_view(), name="application_review_sync_api"), |
266 | | - path("v1/rounds/<int:round_id>/approved-projects/sync", ApprovedProjectsSyncAPI.as_view(), name="approved_projects_sync_api"), |
267 | | - path("v1/rounds/<int:round_id>/deposits/sync", RoundDepositsSyncAPI.as_view(), name="round_deposits_sync_api"), |
268 | | - path("v1/rounds/<int:round_id>/votes/sync", RoundVotesSyncAPI.as_view(), name="round_votes_sync_api"), |
269 | | - path("v1/rounds/<int:round_id>/payouts/sync", RoundPayoutsSyncAPI.as_view(), name="round_payouts_sync_api"), |
270 | | - |
271 | 259 | path( |
272 | 260 | "v1/mpdao/voters", |
273 | 261 | MpdaoVotersListAPI.as_view(), |
|
278 | 266 | MpdaoVoterDetailAPI.as_view(), |
279 | 267 | name="mpdao_voter_detail", |
280 | 268 | ), |
281 | | - # sync endpoints (for on-demand data fetching from blockchain) |
282 | | - # NEAR list sync endpoints (kept for NEAR/potlock frontend) |
283 | | - path( |
284 | | - "v1/near/lists/<int:list_id>/sync", |
285 | | - ListSyncAPI.as_view(), |
286 | | - name="near_list_sync_api", |
287 | | - ), |
288 | | - path( |
289 | | - "v1/near/lists/<int:list_id>/registrations/sync", |
290 | | - ListRegistrationsSyncAPI.as_view(), |
291 | | - name="near_list_registrations_sync_api", |
292 | | - ), |
293 | | - path( |
294 | | - "v1/near/lists/<int:list_id>/registrations/<str:registrant_id>/sync", |
295 | | - SingleRegistrationSyncAPI.as_view(), |
296 | | - name="near_single_registration_sync_api", |
297 | | - ), |
298 | | - # Stellar list sync endpoints (grantpicks frontend) |
299 | | - path( |
300 | | - "v1/lists/<int:list_id>/sync", |
301 | | - StellarListSyncAPI.as_view(), |
302 | | - name="list_sync_api", |
303 | | - ), |
304 | | - path( |
305 | | - "v1/lists/<int:list_id>/registrations/sync", |
306 | | - StellarListRegistrationsSyncAPI.as_view(), |
307 | | - name="list_registrations_sync_api", |
308 | | - ), |
309 | | - path( |
310 | | - "v1/lists/<int:list_id>/registrations/<str:registrant_id>/sync", |
311 | | - StellarSingleRegistrationSyncAPI.as_view(), |
312 | | - name="single_registration_sync_api", |
313 | | - ), |
314 | | - # pot sync endpoints |
315 | | - path( |
316 | | - "v1/pots/<str:pot_id>/sync", |
317 | | - PotSyncAPI.as_view(), |
318 | | - name="pot_sync_api", |
319 | | - ), |
320 | | - path( |
321 | | - "v1/pots/<str:pot_id>/donations/sync", |
322 | | - PotDonationsSyncAPI.as_view(), |
323 | | - name="pot_donations_sync_api", |
324 | | - ), |
325 | | - path( |
326 | | - "v1/pots/<str:pot_id>/applications/sync", |
327 | | - PotApplicationsSyncAPI.as_view(), |
328 | | - name="pot_applications_sync_api", |
329 | | - ), |
330 | | - path( |
331 | | - "v1/pots/<str:pot_id>/payouts/sync", |
332 | | - PotPayoutsSyncAPI.as_view(), |
333 | | - name="pot_payouts_sync_api", |
334 | | - ), |
335 | | - path( |
336 | | - "v1/pots/<str:pot_id>/challenges/sync", |
337 | | - PotPayoutChallengesSyncAPI.as_view(), |
338 | | - name="pot_challenges_sync_api", |
339 | | - ), |
340 | | - path( |
341 | | - "v1/lists/<int:list_id>/delete/sync", |
342 | | - ListDeleteSyncAPI.as_view(), |
343 | | - name="list_delete_sync_api", |
344 | | - ), |
345 | | - path( |
346 | | - "v1/lists/<int:list_id>/upvote/sync", |
347 | | - ListUpvoteSyncAPI.as_view(), |
348 | | - name="list_upvote_sync_api", |
349 | | - ), |
350 | | - path( |
351 | | - "v1/lists/<int:list_id>/remove-upvote/sync", |
352 | | - ListRemoveUpvoteSyncAPI.as_view(), |
353 | | - name="list_remove_upvote_sync_api", |
354 | | - ), |
355 | | - # pot sync endpoints |
356 | | - path( |
357 | | - "v1/pots/<str:pot_id>/sync", |
358 | | - PotSyncAPI.as_view(), |
359 | | - name="pot_sync_api", |
360 | | - ), |
361 | | - path( |
362 | | - "v1/pots/<str:pot_id>/donations/sync", |
363 | | - PotDonationsSyncAPI.as_view(), |
364 | | - name="pot_donations_sync_api", |
365 | | - ), |
366 | | - path( |
367 | | - "v1/pots/<str:pot_id>/applications/sync", |
368 | | - PotApplicationsSyncAPI.as_view(), |
369 | | - name="pot_applications_sync_api", |
370 | | - ), |
371 | | - path( |
372 | | - "v1/pots/<str:pot_id>/payouts/sync", |
373 | | - PotPayoutsSyncAPI.as_view(), |
374 | | - name="pot_payouts_sync_api", |
375 | | - ), |
376 | | - path( |
377 | | - "v1/pots/<str:pot_id>/challenges/sync", |
378 | | - PotPayoutChallengesSyncAPI.as_view(), |
379 | | - name="pot_challenges_sync_api", |
380 | | - ), |
381 | | - path( |
382 | | - "v1/near/lists/<int:list_id>/delete/sync", |
383 | | - ListDeleteSyncAPI.as_view(), |
384 | | - name="near_list_delete_sync_api", |
385 | | - ), |
386 | | - path( |
387 | | - "v1/lists/<int:list_id>/delete/sync", |
388 | | - StellarListDeleteSyncAPI.as_view(), |
389 | | - name="list_delete_sync_api", |
390 | | - ), |
391 | | - path( |
392 | | - "v1/lists/<int:list_id>/upvote/sync", |
393 | | - ListUpvoteSyncAPI.as_view(), |
394 | | - name="list_upvote_sync_api", |
395 | | - ), |
396 | | - path( |
397 | | - "v1/lists/<int:list_id>/remove-upvote/sync", |
398 | | - ListRemoveUpvoteSyncAPI.as_view(), |
399 | | - name="list_remove_upvote_sync_api", |
400 | | - ), |
401 | | - # pot sync endpoints |
402 | | - path( |
403 | | - "v1/pots/<str:pot_id>/sync", |
404 | | - PotSyncAPI.as_view(), |
405 | | - name="pot_sync_api", |
406 | | - ), |
407 | | - path( |
408 | | - "v1/pots/<str:pot_id>/donations/sync", |
409 | | - PotDonationsSyncAPI.as_view(), |
410 | | - name="pot_donations_sync_api", |
411 | | - ), |
412 | | - path( |
413 | | - "v1/pots/<str:pot_id>/applications/sync", |
414 | | - PotApplicationsSyncAPI.as_view(), |
415 | | - name="pot_applications_sync_api", |
416 | | - ), |
417 | | - path( |
418 | | - "v1/pots/<str:pot_id>/payouts/sync", |
419 | | - PotPayoutsSyncAPI.as_view(), |
420 | | - name="pot_payouts_sync_api", |
421 | | - ), |
422 | | - path( |
423 | | - "v1/pots/<str:pot_id>/challenges/sync", |
424 | | - PotPayoutChallengesSyncAPI.as_view(), |
425 | | - name="pot_challenges_sync_api", |
426 | | - ), |
427 | | - # account sync |
428 | | - path( |
429 | | - "v1/accounts/<str:account_id>/sync", |
430 | | - AccountSyncAPI.as_view(), |
431 | | - name="account_sync_api", |
432 | | - ), |
| 269 | + # ========================================================================= |
| 270 | + # GRANTPICKS sync endpoints (Stellar chain — grantpicks frontend) |
| 271 | + # All prefixed with v1/grantpicks/ to avoid conflicts with Potlock/NEAR |
| 272 | + # ========================================================================= |
| 273 | + # Projects |
| 274 | + path("v1/grantpicks/projects/<int:project_id>/sync", ProjectSyncAPI.as_view(), name="grantpicks_project_sync_api"), |
| 275 | + path("v1/grantpicks/projects/sync", ProjectsListSyncAPI.as_view(), name="grantpicks_projects_list_sync_api"), |
| 276 | + # Rounds |
| 277 | + path("v1/grantpicks/rounds/<int:round_id>/sync", RoundSyncAPI.as_view(), name="grantpicks_round_sync_api"), |
| 278 | + path("v1/grantpicks/rounds/sync", RoundsListSyncAPI.as_view(), name="grantpicks_rounds_list_sync_api"), |
| 279 | + path("v1/grantpicks/rounds/<int:round_id>/applications/sync", RoundApplicationsSyncAPI.as_view(), name="grantpicks_round_applications_sync_api"), |
| 280 | + path("v1/grantpicks/rounds/<int:round_id>/applications/review/sync", ApplicationReviewSyncAPI.as_view(), name="grantpicks_application_review_sync_api"), |
| 281 | + path("v1/grantpicks/rounds/<int:round_id>/approved-projects/sync", ApprovedProjectsSyncAPI.as_view(), name="grantpicks_approved_projects_sync_api"), |
| 282 | + path("v1/grantpicks/rounds/<int:round_id>/deposits/sync", RoundDepositsSyncAPI.as_view(), name="grantpicks_round_deposits_sync_api"), |
| 283 | + path("v1/grantpicks/rounds/<int:round_id>/votes/sync", RoundVotesSyncAPI.as_view(), name="grantpicks_round_votes_sync_api"), |
| 284 | + path("v1/grantpicks/rounds/<int:round_id>/payouts/sync", RoundPayoutsSyncAPI.as_view(), name="grantpicks_round_payouts_sync_api"), |
| 285 | + # Lists |
| 286 | + path("v1/grantpicks/lists/<int:list_id>/sync", StellarListSyncAPI.as_view(), name="grantpicks_list_sync_api"), |
| 287 | + path("v1/grantpicks/lists/<int:list_id>/registrations/sync", StellarListRegistrationsSyncAPI.as_view(), name="grantpicks_list_registrations_sync_api"), |
| 288 | + path("v1/grantpicks/lists/<int:list_id>/registrations/<str:registrant_id>/sync", StellarSingleRegistrationSyncAPI.as_view(), name="grantpicks_single_registration_sync_api"), |
| 289 | + path("v1/grantpicks/lists/<int:list_id>/delete/sync", StellarListDeleteSyncAPI.as_view(), name="grantpicks_list_delete_sync_api"), |
| 290 | + # ========================================================================= |
| 291 | + # POTLOCK sync endpoints (NEAR chain — potlock frontend) |
| 292 | + # ========================================================================= |
| 293 | + # Lists |
| 294 | + path("v1/lists/<int:list_id>/sync", ListSyncAPI.as_view(), name="list_sync_api"), |
| 295 | + path("v1/lists/<int:list_id>/registrations/sync", ListRegistrationsSyncAPI.as_view(), name="list_registrations_sync_api"), |
| 296 | + path("v1/lists/<int:list_id>/registrations/<str:registrant_id>/sync", SingleRegistrationSyncAPI.as_view(), name="single_registration_sync_api"), |
| 297 | + path("v1/lists/<int:list_id>/delete/sync", ListDeleteSyncAPI.as_view(), name="list_delete_sync_api"), |
| 298 | + path("v1/lists/<int:list_id>/upvote/sync", ListUpvoteSyncAPI.as_view(), name="list_upvote_sync_api"), |
| 299 | + path("v1/lists/<int:list_id>/remove-upvote/sync", ListRemoveUpvoteSyncAPI.as_view(), name="list_remove_upvote_sync_api"), |
| 300 | + # Pots |
| 301 | + path("v1/pots/<str:pot_id>/sync", PotSyncAPI.as_view(), name="pot_sync_api"), |
| 302 | + path("v1/pots/<str:pot_id>/donations/sync", PotDonationsSyncAPI.as_view(), name="pot_donations_sync_api"), |
| 303 | + path("v1/pots/<str:pot_id>/applications/sync", PotApplicationsSyncAPI.as_view(), name="pot_applications_sync_api"), |
| 304 | + path("v1/pots/<str:pot_id>/payouts/sync", PotPayoutsSyncAPI.as_view(), name="pot_payouts_sync_api"), |
| 305 | + path("v1/pots/<str:pot_id>/challenges/sync", PotPayoutChallengesSyncAPI.as_view(), name="pot_challenges_sync_api"), |
| 306 | + # Accounts |
| 307 | + path("v1/accounts/<str:account_id>/sync", AccountSyncAPI.as_view(), name="account_sync_api"), |
433 | 308 | ] |
0 commit comments