| | |
| | | }) |
| | | .get("/user/userid/:userid", async function (req, res) { |
| | | const {userid} = req.params |
| | | if(!userid || isNaN(Number(userid))) { |
| | | return res.code(500).send({status: "error", msg: "userid error"}) |
| | | } |
| | | const user = await db.getUserByUserId(userid) |
| | | if (user) { |
| | | return res.send(user) |
| | |
| | | } |
| | | |
| | | async function joinUDF (user) { |
| | | if(!user) return user |
| | | const fields = await getUserDefinedField(user.usr_id) |
| | | for (const field of fields) { |
| | | user[field.field_name] = field.value |
| | |
| | | "mysql2": "^3.14.1", |
| | | "nconf": "^0.13.0", |
| | | "nodemon": "^3.1.10", |
| | | "stylus": "^0.64.0", |
| | | "vue": "^3.5.13", |
| | | "yargs": "^15.4.1" |
| | | }, |
| | |
| | | "vite": "^6.2.4", |
| | | "vite-plugin-vue-devtools": "^7.7.2" |
| | | } |
| | | }, |
| | | "node_modules/@adobe/css-tools": { |
| | | "version": "4.3.3", |
| | | "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", |
| | | "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", |
| | | "license": "MIT" |
| | | }, |
| | | "node_modules/@ampproject/remapping": { |
| | | "version": "2.3.0", |
| | |
| | | "license": "MIT", |
| | | "engines": { |
| | | "node": ">=8" |
| | | } |
| | | }, |
| | | "node_modules/@pkgjs/parseargs": { |
| | | "version": "0.11.0", |
| | | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", |
| | | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", |
| | | "license": "MIT", |
| | | "optional": true, |
| | | "engines": { |
| | | "node": ">=14" |
| | | } |
| | | }, |
| | | "node_modules/@polka/url": { |
| | |
| | | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", |
| | | "license": "MIT" |
| | | }, |
| | | "node_modules/sax": { |
| | | "version": "1.4.1", |
| | | "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", |
| | | "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", |
| | | "license": "ISC" |
| | | }, |
| | | "node_modules/secure-json-parse": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.0.0.tgz", |
| | |
| | | "atomic-sleep": "^1.0.0" |
| | | } |
| | | }, |
| | | "node_modules/source-map": { |
| | | "version": "0.7.4", |
| | | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", |
| | | "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", |
| | | "license": "BSD-3-Clause", |
| | | "engines": { |
| | | "node": ">= 8" |
| | | } |
| | | }, |
| | | "node_modules/source-map-js": { |
| | | "version": "1.2.1", |
| | | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", |
| | |
| | | "url": "https://github.com/sponsors/sindresorhus" |
| | | } |
| | | }, |
| | | "node_modules/stylus": { |
| | | "version": "0.64.0", |
| | | "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.64.0.tgz", |
| | | "integrity": "sha512-ZIdT8eUv8tegmqy1tTIdJv9We2DumkNZFdCF5mz/Kpq3OcTaxSuCAYZge6HKK2CmNC02G1eJig2RV7XTw5hQrA==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "@adobe/css-tools": "~4.3.3", |
| | | "debug": "^4.3.2", |
| | | "glob": "^10.4.5", |
| | | "sax": "~1.4.1", |
| | | "source-map": "^0.7.3" |
| | | }, |
| | | "bin": { |
| | | "stylus": "bin/stylus" |
| | | }, |
| | | "engines": { |
| | | "node": ">=16" |
| | | }, |
| | | "funding": { |
| | | "url": "https://opencollective.com/stylus" |
| | | } |
| | | }, |
| | | "node_modules/stylus/node_modules/brace-expansion": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", |
| | | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "balanced-match": "^1.0.0" |
| | | } |
| | | }, |
| | | "node_modules/stylus/node_modules/glob": { |
| | | "version": "10.4.5", |
| | | "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", |
| | | "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "foreground-child": "^3.1.0", |
| | | "jackspeak": "^3.1.2", |
| | | "minimatch": "^9.0.4", |
| | | "minipass": "^7.1.2", |
| | | "package-json-from-dist": "^1.0.0", |
| | | "path-scurry": "^1.11.1" |
| | | }, |
| | | "bin": { |
| | | "glob": "dist/esm/bin.mjs" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/isaacs" |
| | | } |
| | | }, |
| | | "node_modules/stylus/node_modules/jackspeak": { |
| | | "version": "3.4.3", |
| | | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", |
| | | "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", |
| | | "license": "BlueOak-1.0.0", |
| | | "dependencies": { |
| | | "@isaacs/cliui": "^8.0.2" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/isaacs" |
| | | }, |
| | | "optionalDependencies": { |
| | | "@pkgjs/parseargs": "^0.11.0" |
| | | } |
| | | }, |
| | | "node_modules/stylus/node_modules/lru-cache": { |
| | | "version": "10.4.3", |
| | | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", |
| | | "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", |
| | | "license": "ISC" |
| | | }, |
| | | "node_modules/stylus/node_modules/minimatch": { |
| | | "version": "9.0.5", |
| | | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", |
| | | "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "brace-expansion": "^2.0.1" |
| | | }, |
| | | "engines": { |
| | | "node": ">=16 || 14 >=14.17" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/isaacs" |
| | | } |
| | | }, |
| | | "node_modules/stylus/node_modules/path-scurry": { |
| | | "version": "1.11.1", |
| | | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", |
| | | "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", |
| | | "license": "BlueOak-1.0.0", |
| | | "dependencies": { |
| | | "lru-cache": "^10.2.0", |
| | | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=16 || 14 >=14.18" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/isaacs" |
| | | } |
| | | }, |
| | | "node_modules/superjson": { |
| | | "version": "2.2.2", |
| | | "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.2.tgz", |
| | |
| | | "main": "app.js", |
| | | "scripts": { |
| | | "start": "node app.js", |
| | | "dev": "nodemon app.js" |
| | | "dev": "nodemon app.js", |
| | | "dev-ui": "vite", |
| | | "build": "vite build" |
| | | }, |
| | | "dependencies": { |
| | | "@fastify/static": "^8.2.0", |
| | |
| | | "mysql2": "^3.14.1", |
| | | "nconf": "^0.13.0", |
| | | "nodemon": "^3.1.10", |
| | | "stylus": "^0.64.0", |
| | | "vue": "^3.5.13", |
| | | "yargs": "^15.4.1" |
| | | }, |
| | |
| | | <script setup> |
| | | import HelloWorld from './components/HelloWorld.vue' |
| | | import TheWelcome from './components/TheWelcome.vue' |
| | | </script> |
| | | |
| | | <template> |
| | | <header> |
| | | <img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" /> |
| | | |
| | | <div class="wrapper"> |
| | | <HelloWorld msg="You did it!" /> |
| | | </div> |
| | | <header> |
| | | <h1>globus-ilias-rest UI</h1> |
| | | </header> |
| | | |
| | | <main> |
| | | <TheWelcome /> |
| | | </main> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | header { |
| | | line-height: 1.5; |
| | | } |
| | | <style scoped lang="stylus"> |
| | | |
| | | .logo { |
| | | display: block; |
| | | margin: 0 auto 2rem; |
| | | } |
| | | |
| | | @media (min-width: 1024px) { |
| | | header { |
| | | display: flex; |
| | | place-items: center; |
| | | padding-right: calc(var(--section-gap) / 2); |
| | | } |
| | | |
| | | .logo { |
| | | margin: 0 2rem 0 0; |
| | | } |
| | | |
| | | header .wrapper { |
| | | display: flex; |
| | | place-items: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | } |
| | | </style> |