Commit 69e9ddfb authored by Tobinsk's avatar Tobinsk
Browse files

Merge branch '5-cache-should-save-aswers' into 'master'

Resolve "Cache should save aswers"

Closes #5

See merge request !19
parents 959bba51 5e8a161d
Pipeline #1739 passed with stage
in 2 minutes and 35 seconds
......@@ -37,13 +37,12 @@ export interface InterfaceStreamAppResponse {
/**
* mocked config defining the condition before answer
* all the condition gets concated with an and operator. A nested array is or
* all the condition gets concated with an AND operator. A nested array is or
* f.e. [['neo4jresolver', 'elasticsearchresolver',],'metadataresolver'] = ((neo4jresolver || elasticsearchresolver) && metadataresolver)
* todo: in the future a user should configure the widget
*/
const config: InterfaceResponseConfig = {
data: ['resolverneo4j', 'resolverelasticsearch',],
metadata: 'resolvermetadata',
data: ['resolverneo4j', 'resolverelasticsearch',]
};
export class ApiController {
......@@ -112,18 +111,18 @@ export class ApiController {
/**
* Build a message for kafka
* @param {number} uuid
* @param {string} id
* @param {string} verb
* @param {string} node
* @param {{trust: string[]; depth: number}} options
* @returns {{id: number; verb: string; node: string; trust: Array; depth: number}}
* @param {{trust: number, depth: number}} options
* @returns {{id: string; verb: string; node: string; trust: number; depth: number}}
*/
private static buildMessage(uuid: number, verb: string, node: string, options = {trust: 1, depth: 1}) {
private static buildMessage(id: string, verb: string, node: string, options = {trust: 1, depth: 1}) {
// the message needs to be compatible to the schema
return {
id: uuid,
verb: verb,
node: node,
id,
verb,
node,
trust: options.trust || 1,
depth: options.depth || 1
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment