mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-06-29 08:47:40 +00:00
Fix fetch request content type (#2562)
This commit is contained in:
parent
c15ef3ca76
commit
f54cc2f853
@ -45,6 +45,7 @@ export default class ApiClient {
|
|||||||
headers: {
|
headers: {
|
||||||
...(method !== 'GET' && this.csrf ? { 'X-CSRF-TOKEN': this.csrf } : {}),
|
...(method !== 'GET' && this.csrf ? { 'X-CSRF-TOKEN': this.csrf } : {}),
|
||||||
...(this.token ? { Authorization: `Bearer ${this.token}` } : {}),
|
...(this.token ? { Authorization: `Bearer ${this.token}` } : {}),
|
||||||
|
...(data ? { 'Content-Type': 'application/json' } : {}),
|
||||||
},
|
},
|
||||||
body: data ? JSON.stringify(data) : undefined,
|
body: data ? JSON.stringify(data) : undefined,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user