skip to Main Content

Javascript – DELETE Swagger API entry with JS

I'm trying to delete entry [i] from Swagger API with a button. function deleteWork(id) { fetch("http://localhost:5678/api/works/" + id, { method: "DELETE", headers: {"Content-Type": "application/json"}, body: JSON.stringify( { "id": id }) }) } The following code is inside a for loop,…

VIEW QUESTION

Reactjs – React axios get parameter is undefined

I want to get some data from an api with a parameter current user's username. useEffect(()=>{ console.log(currentUser[0]?.id.toString()) if (currentUser) { console.log(currentUser[0]?.id.toString()) axios.get(`http://127.0.0.1:8000/get_chat2/?user1=${currentUser[0]?.id.toString()}&user2=`).then(res=>{ setUsers(res.data) console.log(res.data) }) },[currentUser]) When I print currentUser[0]?.id.toString() I get user's id but when I send the request…

VIEW QUESTION

Asp.net – After saving the data to the database once, it does not save the second one

I'm pretty new to this industry. This is the Create method in BaseRepository: public async Task CreateAsync(TEntity entity) { await _db.Set<TEntity>().AddAsync(entity); await _db.SaveChangesAsync(); } This is the Create method inside the UserService class. public ResultService<UserCreateDTO> Create(UserCreateVM userCreateVM) { ResultService<UserCreateDTO> result…

VIEW QUESTION

Json – how to pull movie id(tmdb api) , @PathVarible

I started my first spring boot project. That's why it's not enough. Already looked for stack overflows and googling. I'd appreciate your help. **tmdb api Query For Details ** 'https://api.themoviedb.org/3/movie/343611?api_key=87bad1aa...~' movie_id : 343611 Controller import com.example.joyit.service.MovieSearchService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j;…

VIEW QUESTION
Back To Top
Search