UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

Draft: Rough rough draft of Tool BE files for Tool status comp

Closed Hunter Suchyj requested to merge BULL-1972 into master
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 import { Router } from 'express';
2 import { jsonResponse } from '../lib/request-response-helpers';
3 import { authz } from '../auth/authservice-middleware';
4 import ToolService from '../services/tool-service';
5
6 const statusApi = new Router();
  • 1 import db from '../config/dbConfig';
    2 import Sequelize from 'sequelize';
    3
    4 class Tool extends Sequelize.Model {}
    5 Tool.init(
    6 {
    7 toolName: Sequelize.DataTypes.STRING,
    8 toolStatus: Sequelize.DataTypes.STRING,
  • 1 import Tool from '../models/tool';
    2
    3 export default class ToolService {
    4 static async getTools() {
    5 const query = {
    6 include: [],
    7 distinct: true,
    • going with the comment in the model/tool.js, instead of getting a distinct value, would you want to collect all values for a given tool name over a specific date range( in the case of the image, past 90 days)?

    • Please register or sign in to reply
  • Just some comments about the db setup, I could be way off the mark though since my knowledge of sequelize is limited.

  • Hunter Suchyj added 1 commit

    added 1 commit

    • ecb01926 - added test data and BE changes

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading