n8n-nodes-nuwa
Version:
An n8n node for integrating with the GVA (Gin-Vue-Admin) backend system.
49 lines (48 loc) • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GvaApi = void 0;
class GvaApi {
constructor() {
this.name = 'gvaApi';
this.displayName = 'GVA API';
this.documentationUrl = 'https://www.gin-vue-admin.com/';
this.properties = [
{
displayName: '基础URL',
name: 'baseUrl',
type: 'string',
default: '',
placeholder: '',
description: '您的GVA实例的基础URL地址',
required: true,
},
{
displayName: 'X-Token',
name: 'token',
type: 'string',
default: '',
description: '您的GVA API认证令牌',
required: true,
typeOptions: {
password: true,
},
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
'x-token': '={{$credentials.token}}',
},
},
};
this.test = {
request: {
baseURL: '={{$credentials.baseUrl}}',
url: '/api/user/getUserInfo', // A stable, lightweight endpoint for testing credentials
method: 'GET',
},
};
}
}
exports.GvaApi = GvaApi;