@axium/server 0.39.5 → 0.39.7

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/dist/auth.js CHANGED
@@ -121,8 +121,8 @@ export async function authSessionForItem(itemType, itemId, permissions, session,
121
121
  .select(acl.from(itemType))
122
122
  .executeTakeFirstOrThrow()
123
123
  .catch(e => {
124
- if (e.message.includes('no rows'))
125
- error(404, itemType + ' not found');
124
+ if (e.constructor.name == 'NoResultError' || e.message.includes('no rows'))
125
+ error(404, 'Not found');
126
126
  throw e;
127
127
  }));
128
128
  const result = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.39.5",
3
+ "version": "0.39.7",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -1,4 +1,4 @@
1
- <div class="main">
1
+ <div id="default">
2
2
  <h1>It works!</h1>
3
3
  <p>This is the default Axium page. You'll want to change it.</p>
4
4
  <h3>Helpful links</h3>
@@ -9,3 +9,14 @@
9
9
  <li><a href="/account">Account</a></li>
10
10
  </ul>
11
11
  </div>
12
+
13
+ <style>
14
+ #default {
15
+ padding: 2em;
16
+ border-radius: 1em;
17
+ background-color: var(--bg-menu);
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 1em;
21
+ }
22
+ </style>
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  <p class="greeting">{text('page.account.greeting', { name: user.name })}</p>
40
40
 
41
- <div id="info" class="section main">
41
+ <div id="info" class="section">
42
42
  <h3>{text('page.account.personal_info')}</h3>
43
43
  <div class="item info">
44
44
  <p class="subtle">{text('generic.username')}</p>
@@ -96,7 +96,7 @@
96
96
  </div>
97
97
  </div>
98
98
 
99
- <div id="passkeys" class="section main">
99
+ <div id="passkeys" class="section">
100
100
  <h3>{text('page.account.passkeys.title')}</h3>
101
101
  {#each passkeys as passkey}
102
102
  <div class="item passkey">
@@ -163,12 +163,12 @@
163
163
  </button>
164
164
  </div>
165
165
 
166
- <div id="sessions" class="section main">
166
+ <div id="sessions" class="section">
167
167
  <h3>{text('page.account.sessions')}</h3>
168
168
  <SessionList {sessions} {currentSession} {user} redirectAfterLogoutAll />
169
169
  </div>
170
170
 
171
- <div id="preferences" class="section main">
171
+ <div id="preferences" class="section">
172
172
  <h3>{text('page.account.preferences')}</h3>
173
173
  <ZodForm
174
174
  bind:rootValue={user.preferences}
@@ -36,7 +36,7 @@
36
36
 
37
37
  <h2>{text('page.admin.users.manage_heading')}</h2>
38
38
 
39
- <div id="info" class="section main">
39
+ <div id="info" class="section">
40
40
  <div class="item info">
41
41
  <p>{text('page.admin.users.uuid')}</p>
42
42
  <p>{user.id}</p>
@@ -126,12 +126,12 @@
126
126
  </FormDialog>
127
127
  </div>
128
128
 
129
- <div id="sessions" class="section main">
129
+ <div id="sessions" class="section">
130
130
  <h3>{text('generic.sessions')}</h3>
131
131
  <SessionList {sessions} {user} />
132
132
  </div>
133
133
 
134
- <div id="preferences" class="section main">
134
+ <div id="preferences" class="section">
135
135
  <h3>{text('generic.preferences')}</h3>
136
136
  <ZodForm
137
137
  bind:rootValue={user.preferences}