Skip to content

Tool for adding studentMainGroupName to documents where it is missing

License

Notifications You must be signed in to change notification settings

telemark/minelev-fix-missing-mainGroupName

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
Mar 7, 2022
Mar 7, 2022
Nov 5, 2020

Repository files navigation

minelev-fix-missing-mainGroupName

Tool for adding studentMainGroupName to documents where it is missing

Setup

  • Clone the repo
  • Install dependencies
  • Add a local .env file
MONGODB_CONNECTION=your-mongodb-connection-string
MONGODB_COLLECTION=your-mongodb-collection-name
MONGODB_NAME=your-mongodb-database-name
TJOMMI_SERVICE_URL=url-to-tjommi-compatible-web-service
TJOMMI_SERVICE_SECRET=jwt-secret-for-the-tjommi-service

Usage

documents:count

Returns the number of documents missing studentMainGroupName

$ npm run documents:count

documents:collect

Saves an array of all documents to be updated to disc

$ npm run documents:collect

start

Updates missing documents with mainGroupName from student.

Run this after documents:collect

$ npm start

Licence

MIT