aboutsummaryrefslogtreecommitdiffstats
path: root/models.js
blob: e0b4abb1dda6494ac28dfe1978431f8e4d70fcb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module.exports = db => {
  const endpoints = db.get('endpoints');
  endpoints.createIndex({name: 1}, {unique: true});

  const secrets = db.get('secrets');
  secrets.createIndex({key: 1}, {unique: true});

  const packages = db.get('packages');

  return {
    endpoints,
    secrets,
    packages
  };
};