This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* データの取得の基本: await $core.$models.[modelName].find() | |
* - デフォルト 100件まで, 取得順のデフォルト: idの降順(DESC) | |
**/ | |
await $core.$models.selectOptionsMaster.find() | |
// IDで1件のみ取得(ID 10のものを取得): findById(10) | |
await $core.$models.selectOptionsMaster.findById(10) | |
// 取得件数制御, 5件のみ (デフォルト 100): find({ limit: 5 }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<base href='https://core-admin-assets-prod.core-fw.com'> | |
<script> | |
// この値を、環境に応じて書き換え | |
window.CORE_API_DOMAIN = 'https://365c948c0ad34a9793ffe837a122b3d9.e250tryb4s6fi7.core-fw.com' | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// api-directus/extensions/endpoints/samplepath/index.js | |
const {$serverErrorReporter} = require("../../../../CORE/src/server/$serverErrorReporter"); | |
module.exports = function ( | |
router, | |
directusOptionalArgs, | |
) { | |
// 別のTypescript ファイルへ分ける場合 | |
// require('../../../../models/modelServices/testApiEndpoint').registerTestApiEndpoints(router, directusOptionalArgs) | |
// 最小限の例 [GET] `/samplepath/minimal-sample` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
- 方針概要: DB接続して云々処理するService class を作成し、APIでもバッチでも読み出して実施する | |
- 開発中は、コマンド叩いて実行、デバッグできるように構成したほうがやりやすい | |
- [x] debugger で呼び出して、intellij のブレークポイントでデバッグできるように | |
- デバッグ用スクリプト `script/debug.ts` に | |
- [x] Service class を作成 | |
- [x] DB接続を記述, CLIでデバッグできるように | |
- database接続の取得: | |
- Nodejs の ORM Knex https://knexjs.org/ の接続インスタンスが取得できる | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Execute this on devtool console | |
(function () { | |
const rows = document.querySelectorAll('[role="row"]') | |
const out = [] | |
rows.forEach((row) => { | |
const cells = row.querySelectorAll('[role="gridcell"]') | |
const outRow = [] | |
cells.forEach((cell) => { | |
outRow.push(cell.innerText.replace(/\n/g, ' ').trim()) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"2023-04-01", | |
"2023-04-02", | |
"2023-04-08", | |
"2023-04-09", | |
"2023-04-15", | |
"2023-04-16", | |
"2023-04-22", | |
"2023-04-23", | |
"2023-04-29", |
OlderNewer