@whyour/qinglong 2.18.0 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -145,9 +145,16 @@ let OpenService = class OpenService {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
async generateSystemToken() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
var _a;
|
|
149
|
+
let systemApp = (_a = (await open_1.AppModel.findOne({
|
|
150
|
+
where: { name: 'system' },
|
|
151
|
+
}))) === null || _a === void 0 ? void 0 : _a.get({ plain: true });
|
|
152
|
+
if (!systemApp) {
|
|
153
|
+
systemApp = await this.create({
|
|
154
|
+
name: 'system',
|
|
155
|
+
scopes: ['crons', 'system'],
|
|
156
|
+
});
|
|
157
|
+
}
|
|
151
158
|
const { data } = await this.authToken({
|
|
152
159
|
client_id: systemApp.client_id,
|
|
153
160
|
client_secret: systemApp.client_secret,
|