user hace 6 años
padre
commit
ccab1c8fff
Se han modificado 5 ficheros con 5 adiciones y 5 borrados
  1. 2 1
      lib/index.js
  2. 1 1
      lib/index.js.map
  3. 0 1
      lib/upload-item-parameters.d.ts
  4. 2 1
      src/index.ts
  5. 0 1
      src/upload-item-parameters.ts

+ 2 - 1
lib/index.js

@@ -127,6 +127,7 @@ class BankClient {
         return __awaiter(this, void 0, void 0, function* () {
             const url = this.urlBase + '/bank/upload';
             const formData = {};
+            formData.creator = yield this.getPub();
             if (params.fileData) {
                 formData.file = {
                     value: params.fileData,
@@ -146,7 +147,7 @@ class BankClient {
             if (params.links) {
                 formData.links = JSON.stringify(params.links);
             }
-            for (const attr of ['title', 'text', 'type', 'creator']) {
+            for (const attr of ['title', 'text', 'type']) {
                 if (params[attr] != null) {
                     formData[attr] = params[attr];
                 }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
lib/index.js.map


+ 0 - 1
lib/upload-item-parameters.d.ts

@@ -1,7 +1,6 @@
 import { UploadItemLink } from "./upload-item-link";
 export interface UploadItemParameters {
     type?: string;
-    creator?: string;
     title: string;
     text?: string;
     fileName?: string;

+ 2 - 1
src/index.ts

@@ -122,6 +122,7 @@ export class BankClient {
     public async upload(params: UploadItemParameters) {
       const url = this.urlBase + '/bank/upload';
       const formData: any = {};
+      formData.creator = await this.getPub();
       if (params.fileData) {
         formData.file = {
           value: params.fileData,
@@ -141,7 +142,7 @@ export class BankClient {
       if (params.links) {
         formData.links = JSON.stringify(params.links);
       }
-      for (const attr of ['title', 'text', 'type', 'creator']) {
+      for (const attr of ['title', 'text', 'type']) {
         if (params[attr] != null) {
           formData[attr] = params[attr];
         }

+ 0 - 1
src/upload-item-parameters.ts

@@ -2,7 +2,6 @@ import { UploadItemLink } from "./upload-item-link";
 
 export interface UploadItemParameters {
     type?: string;
-    creator?: string;
     title: string;
     text?: string;
     fileName?: string;