Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
golsch committed Dec 10, 2024
1 parent eb2f655 commit 50ff060
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default tseslint.config(
{
accessibility: "explicit",
overrides: {
constructors: "no-public", // Optional
constructors: "no-public",
},
}
],
Expand All @@ -35,6 +35,7 @@ export default tseslint.config(
ignoreUrls: true,
},
],
"no-trailing-spaces": "error",
},
},
);
5 changes: 3 additions & 2 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "@golsch/test",
"version": "1.0.2",
"name": "@mycore/mycore",
"version": "1.0.3",
"exports": {
"./i18n": "./src/i18n/i18n.ts",
"./auth": "./src/auth/auth.ts"
"./orcid": "./src/orcid/orcid.ts"
},
"publish": {
"include": [
Expand Down
16 changes: 8 additions & 8 deletions src/auth/MCRAuthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class MCRAuthService {
}

public fetchJWT = async(params?: Record<string, string>): Promise<void> => {
try {
const url = new URL(`${this.baseUrl}rsc/jwt`);
if (params) {
const urlParams = new URLSearchParams();
for (const key in params) {
urlParams.append(key, params[key]);
}
url.search = urlParams.toString();
const url = new URL(`${this.baseUrl}rsc/jwt`);
if (params) {
const urlParams = new URLSearchParams();
for (const key in params) {
urlParams.append(key, params[key]);
}
url.search = urlParams.toString();
}
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error('Failed to fetch JWT for current user.');
Expand Down
2 changes: 2 additions & 0 deletions src/orcid/orcid.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { MCROrcidUserService } from "./MCROrcidUserService.ts";
export { MCROrcidWorkService } from "./MCROrcidWorkService.ts";

0 comments on commit 50ff060

Please sign in to comment.