Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getStreet(city_id){
- let token = localStorage.getItem('user-token')
- fetch('/api/v1/street', {
- headers: {'Accept': 'application/json', 'Content-Type': 'application/json'},
- method: 'POST',
- body: JSON.stringify({token: token, data: {
- // city_id: this.cities.city_id
- city_id: this.city_id
- }})
- })
- .then(result => {
- return result.json()
- }).then(data=>{
- this.streets = data.result.list
- console.log(data.result.list)
- })
- .catch((error) => {
- console.log(error)
- })
- console.log(this.newBuilding.city_id)
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement