veza/apps/web/dist_verification/assets/socialService-BgeMqoR7.js
senke 04c25aa24f Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy
Bloc A - Code mort:
- Suppression Studio (components, views, features)
- Suppression gamification + services mock (projectService, storageService, gamificationService)
- Mise à jour Sidebar, Navbar, locales

Bloc B - Frontend:
- Suppression modal.tsx deprecated, Modal.stories (doublon Dialog)
- Feature flags: PLAYLIST_SEARCH, PLAYLIST_RECOMMENDATIONS, ROLE_MANAGEMENT = true
- Suppression 19 tests orphelins, retrait exclusions vitest.config

Bloc C - Backend:
- Extraction routes_auth.go depuis router.go

Bloc D - Rust:
- Suppression security_legacy.rs (code mort, patterns déjà dans security/)
2026-02-14 17:23:32 +01:00

1 line
1.9 KiB
JavaScript

import{g as e}from"./index-CYK_b1Uz.js";const p={getFeed:async t=>({posts:(await e.get("/social/feed",{params:t})).data.map(n=>({id:n.id,author:{name:"User",handle:"@user",avatar:""},content:n.content,timestamp:n.created_at,likes:0,comments:0,shares:0,type:"text"}))}),getPostsByUser:async(t,a=1,s)=>{const n=await e.get(`/social/posts/user/${t}`,{params:{page:a,limit:10}}),r=s?{name:s.first_name||s.last_name?`${s.first_name||""} ${s.last_name||""}`.trim():s.username,handle:`@${s.username}`,avatar:s.avatar_url||"",isVerified:!1}:{name:"User",handle:"@user",avatar:""};return{posts:n.data.map(o=>({id:o.id,author:r,content:o.content,timestamp:o.created_at,likes:o.like_count,comments:o.comment_count,shares:0,type:"text"})),total:100}},createPost:async t=>{const s=(await e.post("/social/posts",t)).data;return{post:{id:s.id,author:{name:"Me",handle:"@me",avatar:""},content:s.content,timestamp:s.created_at,likes:0,comments:0,shares:0,type:"text"}}},toggleLike:async(t,a)=>(await e.post("/social/like",{target_id:t,target_type:a})).data,getChatToken:async()=>(await e.post("/chat/token")).data,getChatStats:async()=>(await e.get("/chat/stats")).data,getComments:async t=>({comments:(await e.get(`/tracks/${t}/comments`)).data}),postComment:async(t,a)=>(await e.post(`/tracks/${t}/comments`,{content:a})).data,deleteComment:async t=>(await e.delete(`/comments/${t}`),{success:!0}),getNotifications:async()=>({notifications:(await e.get("/notifications")).data}),markRead:async t=>(await e.post(`/notifications/${t}/read`)).data,markAllRead:async()=>(await e.post("/notifications/read-all")).data,getWebhooks:async()=>(await e.get("/webhooks")).data,registerWebhook:async t=>{await e.post("/webhooks",t)},deleteWebhook:async t=>{await e.delete(`/webhooks/${t}`)},testWebhook:async t=>{await e.post(`/webhooks/${t}/test`)},getWebhookStats:async()=>(await e.get("/webhooks/stats")).data,regenerateWebhookKey:async t=>(await e.post(`/webhooks/${t}/regenerate-key`)).data};export{p as s};