Compare commits
31
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18ce66e507 | ||
|
|
acce8d726b | ||
|
|
164e498476 | ||
|
|
48e0ca80bd | ||
|
|
0f4930f6c8 | ||
|
|
e0cade01c9 | ||
|
|
dd79dbc90b | ||
|
|
9e1ac86761 | ||
|
|
abfc8ebfb4 | ||
|
|
872c24e6ea | ||
|
|
6dcff91bf7 | ||
|
|
ef253de426 | ||
|
|
0819f51c3a | ||
|
|
d1cae5341f | ||
|
|
3b249fbad2 | ||
|
|
9648587850 | ||
|
|
a5523c1bf6 | ||
|
|
eb84621f23 | ||
|
|
b702229cb1 | ||
|
|
c722776bc0 | ||
|
|
bd7917ab20 | ||
|
|
db9006ea8b | ||
|
|
15f2048bcb | ||
|
|
b0079871b0 | ||
|
|
2bedcae9f1 | ||
|
|
341974fb35 | ||
|
|
d6bfbb0045 | ||
|
|
dc9338b991 | ||
|
|
6f6f7d4542 | ||
|
|
617f9c14ed | ||
|
|
54fdb0948c |
@@ -318,7 +318,7 @@ class RegisterUser(BaseModel):
|
|||||||
username: str = Query(default=..., min_length=2, max_length=20)
|
username: str = Query(default=..., min_length=2, max_length=20)
|
||||||
password: str = Query(default=..., min_length=8, max_length=50)
|
password: str = Query(default=..., min_length=8, max_length=50)
|
||||||
password_repeat: str = Query(default=..., min_length=8, max_length=50)
|
password_repeat: str = Query(default=..., min_length=8, max_length=50)
|
||||||
invitation_code: str | None = Query(default=None, max_length=256)
|
invitation_code: str | None = Query(default=None, min_length=1, max_length=256)
|
||||||
|
|
||||||
|
|
||||||
class CreateUser(BaseModel):
|
class CreateUser(BaseModel):
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -295,58 +295,5 @@ window._lnbitsUtils = {
|
|||||||
let decoder = new TextDecoder('utf-8')
|
let decoder = new TextDecoder('utf-8')
|
||||||
return decoder.decode(valueb)
|
return decoder.decode(valueb)
|
||||||
})
|
})
|
||||||
},
|
|
||||||
createWebSocket(endpoint, handlers, options = {}) {
|
|
||||||
const {onMessage, onError, onOpen, onClose} = handlers
|
|
||||||
const {autoParseJSON = true} = options
|
|
||||||
|
|
||||||
try {
|
|
||||||
const url = new URL(window.location)
|
|
||||||
url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'
|
|
||||||
url.pathname = `/api/v1/ws/${endpoint}`
|
|
||||||
|
|
||||||
const ws = new WebSocket(url)
|
|
||||||
|
|
||||||
ws.onmessage = async event => {
|
|
||||||
try {
|
|
||||||
const data = autoParseJSON ? JSON.parse(event.data) : event.data
|
|
||||||
if (onMessage) {
|
|
||||||
await onMessage(data, ws)
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
console.error('WebSocket message parsing error:', err)
|
|
||||||
if (onError) {
|
|
||||||
onError(err, ws)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.onerror = error => {
|
|
||||||
console.warn('WebSocket error:', error)
|
|
||||||
if (onError) {
|
|
||||||
onError(error, ws)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.onopen = event => {
|
|
||||||
if (onOpen) {
|
|
||||||
onOpen(event, ws)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.onclose = event => {
|
|
||||||
if (onClose) {
|
|
||||||
onClose(event, ws)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ws
|
|
||||||
} catch (err) {
|
|
||||||
console.warn('WebSocket creation error:', err)
|
|
||||||
if (onError) {
|
|
||||||
onError(err, null)
|
|
||||||
}
|
|
||||||
throw err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,13 +310,7 @@
|
|||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<q-select
|
<q-select
|
||||||
filled
|
filled
|
||||||
:options="[
|
:options="[$t('second'), $t('minute'), $t('hour')]"
|
||||||
{label: $t('second'), value: 'second'},
|
|
||||||
{label: $t('minute'), value: 'minute'},
|
|
||||||
{label: $t('hour'), value: 'hour'}
|
|
||||||
]"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
v-model="formData.lnbits_rate_limit_unit"
|
v-model="formData.lnbits_rate_limit_unit"
|
||||||
:label="$t('time_unit')"
|
:label="$t('time_unit')"
|
||||||
></q-select>
|
></q-select>
|
||||||
|
|||||||
Reference in New Issue
Block a user