catto.js 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GitHub.js CHANGED
@@ -70,14 +70,14 @@ class GitHub {
70
70
  "url": `https://api.github.com/repos/${this.options.username}/${this.options.repository}/contents/${file}`,
71
71
  "headers": {
72
72
  "User-Agent": this.options.username,
73
- "Authorization": `token ${this.options.token}`
73
+ "Authorization": `token ${this.options.token}`,
74
+ "Content-Type": "application/json"
74
75
  },
75
- "json": !0,
76
- "body": {
76
+ "body": JSON.stringify({
77
77
  "content": Base64.encode(value),
78
78
  "message": this.options.message,
79
79
  "sha": this.shas[file]
80
- }
80
+ })
81
81
  })).body.content.sha;
82
82
  return !0;
83
83
  }
package/Server.js CHANGED
@@ -120,6 +120,10 @@ class Server extends EventEmitter {
120
120
  this.app.param(...args);
121
121
  return this;
122
122
  }
123
+ patch(...args) {
124
+ this.app.patch(...args);
125
+ return this;
126
+ }
123
127
  path(...args) {
124
128
  this.app.path(...args);
125
129
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/request.js CHANGED
@@ -20,7 +20,7 @@ function wrap(method, options) {
20
20
  var options2 = Object.assign({}, options);
21
21
  var url = options2.url;
22
22
  delete options2.url;
23
- options2.method = method;
23
+ options2.method = method.toUpperCase();
24
24
  return new Promise((res, rej) => {
25
25
  fetch(url, options2).then(response => {
26
26
  response.text().then(body => {