diff --git a/composables/fetch.ts b/composables/fetch.ts index 068213c..4004c6c 100644 --- a/composables/fetch.ts +++ b/composables/fetch.ts @@ -13,18 +13,20 @@ export const $api = $fetch.create({ }, }) -export function useApiFetch(url: string, options: UseFetchOptions = {}) { - const defaults: UseFetchOptions = { +type ApiFetchRequest = Ref | T | (() => T) + +export function useApiFetch(request: ApiFetchRequest, options: UseFetchOptions = {}) { + const defaults: UseFetchOptions = { $fetch: $api, } const params = defu(options, defaults) - return useFetch(url, params) + return useFetch(request, params) } -export function useLazyApiFetch(url: string, options: UseFetchOptions = {}) { - const defaults: UseFetchOptions = { +export function useLazyApiFetch(request: ApiFetchRequest, options: Omit, 'lazy'> = {}) { + const defaults: UseFetchOptions = { $fetch: $api, } const params = defu(options, defaults) - return useLazyFetch(url, params) + return useLazyFetch(request, params) } diff --git a/composables/user.ts b/composables/user.ts index 899ef3b..fe30885 100644 --- a/composables/user.ts +++ b/composables/user.ts @@ -1,4 +1,4 @@ export function useUser() { const auth = useCurrentUser() - return useApiFetch('/api/user/abc', { immediate: false, watch: [() => auth.value?.uid] }) + return useApiFetch(() => `/api/user/${auth.value?.uid}`, { immediate: false, watch: [() => auth.value?.uid] }) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d408ae2..f9497d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ devDependencies: version: 2.2.2 '@unocss/nuxt': specifier: ^0.56.0 - version: 0.56.0(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9)(webpack@5.88.2) + version: 0.56.1(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9)(webpack@5.88.2) '@vite-pwa/assets-generator': specifier: ^0.0.10 version: 0.0.10 @@ -273,7 +273,7 @@ packages: dependencies: '@babel/compat-data': 7.22.20 '@babel/helper-validator-option': 7.22.15 - browserslist: 4.21.10 + browserslist: 4.21.11 lru-cache: 5.1.1 semver: 6.3.1 dev: true @@ -1450,7 +1450,7 @@ packages: resolution: {integrity: sha512-NfsJX4PdzhwSkfJukczyUiZGc7zNNWZcEAyqeISpDnn0PTfzMJR1aR8xAIPskBejIxBJbIgCCMzbaYa9SXepIg==} dependencies: '@esbuild-kit/core-utils': 3.3.2 - get-tsconfig: 4.7.1 + get-tsconfig: 4.7.2 dev: true /@esbuild-kit/core-utils@3.3.2: @@ -1464,7 +1464,7 @@ packages: resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} dependencies: '@esbuild-kit/core-utils': 3.3.2 - get-tsconfig: 4.7.1 + get-tsconfig: 4.7.2 dev: true /@esbuild/android-arm64@0.18.20: @@ -2990,7 +2990,6 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 - napi-wasm: 1.1.0 dev: true bundledDependencies: - napi-wasm @@ -3720,32 +3719,32 @@ packages: vue: 3.3.4 dev: true - /@unocss/astro@0.56.0(rollup@2.79.1)(vite@4.4.9): - resolution: {integrity: sha512-yBkpp2vc/dH6AiLAZrHC+trpR16VN4SiMVPgiy/UREj9BHJXVwFxFscjqXnuNP1vaxmVEfcvTkph9nJf/+JFjQ==} + /@unocss/astro@0.56.1(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-ivWm69J76DRwCiEFM75qR4WPMCC6nyOrUM5iQDTypwKbBX26XlXcYYCN3DLoQTmWdp5f2BubZXAg3KIdgVxrYg==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 peerDependenciesMeta: vite: optional: true dependencies: - '@unocss/core': 0.56.0 - '@unocss/reset': 0.56.0 - '@unocss/vite': 0.56.0(rollup@2.79.1)(vite@4.4.9) + '@unocss/core': 0.56.1 + '@unocss/reset': 0.56.1 + '@unocss/vite': 0.56.1(rollup@2.79.1)(vite@4.4.9) vite: 4.4.9 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.56.0(rollup@2.79.1): - resolution: {integrity: sha512-+SD7Pd6xTHj4lW5vZXtebLnCAdhyjrNWsfBHK8exjZF6PVbJWW3wfZ1cBPqveWvS8/1kqsMp2I3GFORKjBiFoQ==} + /@unocss/cli@0.56.1(rollup@2.79.1): + resolution: {integrity: sha512-s7lRtPkNw7GXdej3uYKFgfyal3Bq0Ux9oJKQ3rV7ysvY5AMfHs+ayc1EC6vXsAunziJ39dloPrRY5cx1H7abkQ==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.0.4(rollup@2.79.1) - '@unocss/config': 0.56.0 - '@unocss/core': 0.56.0 - '@unocss/preset-uno': 0.56.0 + '@unocss/config': 0.56.1 + '@unocss/core': 0.56.1 + '@unocss/preset-uno': 0.56.1 cac: 6.7.14 chokidar: 3.5.3 colorette: 2.0.20 @@ -3758,49 +3757,49 @@ packages: - rollup dev: true - /@unocss/config@0.56.0: - resolution: {integrity: sha512-TGyh3Ns15rKPRrVmiqcF9BcZ9yC0fixxwUGm49a2rQ91GOKNIZ6O/tX2MHxoncU/Sp2ZkrRreoT8fsEejfHAYg==} + /@unocss/config@0.56.1: + resolution: {integrity: sha512-ZwKWtbMfg38laUNwjERkiTo3JKCgpw+hZMBqbbr2N4Rhc1ZaT4EJyQmcc/+P05JoNNr+ueYMoCMOCOtn/wuheQ==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 unconfig: 0.3.10 dev: true - /@unocss/core@0.56.0: - resolution: {integrity: sha512-KpaEMCg5XnTK7aQRgwNWoPCAFLEmPGjw+OSZWuMtkGvMr4RwDAVUAqPdGyGOavKMyWs+Is+lxXL5NHy9nhZ2oA==} + /@unocss/core@0.56.1: + resolution: {integrity: sha512-2qmb/+hQ2CXmIgSqaeL6Pw2reO2MxsZlLMFuu71J8T3+UKrkI9NAwkZ4sdb38EoOisVIr2lvE48uc44XBfaOdg==} dev: true - /@unocss/extractor-arbitrary-variants@0.56.0: - resolution: {integrity: sha512-OtdDsief0sqzYkS0GH9+LYUWojOjisjYjk5nLBI9lMfU23l/G76T2BzN8/W19MjUEs80relP4nO/ruefJn0hvw==} + /@unocss/extractor-arbitrary-variants@0.56.1: + resolution: {integrity: sha512-2vEcVwUTpC0yROjvKGjR3HSE8jaf1cwQqL+Ba5oP+Y4Vrjlf8hqvoSowgVT+wp/ecPH8z82xFNhS+XMOdgXpGA==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/inspector@0.56.0: - resolution: {integrity: sha512-YGIyDe0eDzf0XhIHZRxZFV4xGKIA8jGBQ/rOF9k32Z8hyJ3jdJYf7s/ckA6s1kYxFq4qFmznylWeuh8JSUHeMg==} + /@unocss/inspector@0.56.1: + resolution: {integrity: sha512-PJ3MEwOvUjLaiySPQQKlw0XgwpReNK7c+nDX0D8ZBmUyw3swSn8wSar2cCOLsKLRtKRRp4kz1brM/BaleyYyeg==} dependencies: - '@unocss/rule-utils': 0.56.0 + '@unocss/rule-utils': 0.56.1 gzip-size: 6.0.0 sirv: 2.0.3 dev: true - /@unocss/nuxt@0.56.0(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9)(webpack@5.88.2): - resolution: {integrity: sha512-qFvTVUYNBR+FJnGVnfwIdnUMp8hvSbCnySwscvewxdtgjfuBLn/xxVPj2oz3lwedBJ6nEgzmN7cdEWo2rNk7mQ==} + /@unocss/nuxt@0.56.1(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9)(webpack@5.88.2): + resolution: {integrity: sha512-Obp9TDyOp/NhFhtoDoht1W6Lm1QRQ6P0ue7zISdT7S4P7P6ckS4CNU8sHQNOC2gXiv4T3f79Mn26Wsoe7CH63w==} dependencies: '@nuxt/kit': 3.7.3(rollup@2.79.1) - '@unocss/config': 0.56.0 - '@unocss/core': 0.56.0 - '@unocss/preset-attributify': 0.56.0 - '@unocss/preset-icons': 0.56.0 - '@unocss/preset-tagify': 0.56.0 - '@unocss/preset-typography': 0.56.0 - '@unocss/preset-uno': 0.56.0 - '@unocss/preset-web-fonts': 0.56.0 - '@unocss/preset-wind': 0.56.0 - '@unocss/reset': 0.56.0 - '@unocss/vite': 0.56.0(rollup@2.79.1)(vite@4.4.9) - '@unocss/webpack': 0.56.0(rollup@2.79.1)(webpack@5.88.2) - unocss: 0.56.0(@unocss/webpack@0.56.0)(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9) + '@unocss/config': 0.56.1 + '@unocss/core': 0.56.1 + '@unocss/preset-attributify': 0.56.1 + '@unocss/preset-icons': 0.56.1 + '@unocss/preset-tagify': 0.56.1 + '@unocss/preset-typography': 0.56.1 + '@unocss/preset-uno': 0.56.1 + '@unocss/preset-web-fonts': 0.56.1 + '@unocss/preset-wind': 0.56.1 + '@unocss/reset': 0.56.1 + '@unocss/vite': 0.56.1(rollup@2.79.1)(vite@4.4.9) + '@unocss/webpack': 0.56.1(rollup@2.79.1)(webpack@5.88.2) + unocss: 0.56.1(@unocss/webpack@0.56.1)(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9) transitivePeerDependencies: - postcss - rollup @@ -3809,140 +3808,141 @@ packages: - webpack dev: true - /@unocss/postcss@0.56.0(postcss@8.4.30): - resolution: {integrity: sha512-4wYpu8u8fjEeDvpA7m7Sq2wdIcXdoRSuu2HG/co7uqdXJJD6dQtOgI5Q0ooyPhWNx4w3zBCfaADBxfIcWsZotg==} + /@unocss/postcss@0.56.1(postcss@8.4.30): + resolution: {integrity: sha512-8jUS5ynopvMbZmdUQhGv+lvKziuAPHHl9LaZzCJ4uHgPOwITNXWTi4dmNbytdYC3iYPQ++8eOph93VPCxdqVsw==} engines: {node: '>=14'} peerDependencies: postcss: ^8.4.21 dependencies: - '@unocss/config': 0.56.0 - '@unocss/core': 0.56.0 + '@unocss/config': 0.56.1 + '@unocss/core': 0.56.1 + '@unocss/rule-utils': 0.56.1 css-tree: 2.3.1 fast-glob: 3.3.1 magic-string: 0.30.3 postcss: 8.4.30 dev: true - /@unocss/preset-attributify@0.56.0: - resolution: {integrity: sha512-0K+dy8Ey081Tgn1beADIrGmO3yhthM5KVqz+E+ni4o9paZg1DrBXnKA1Y8+fK3fEE1LmKK1hGhBrx68gCFX7XA==} + /@unocss/preset-attributify@0.56.1: + resolution: {integrity: sha512-z+riyM9Fl+aYReg3cgxDRrI52teOL6ebj1UkMOje5sXuhneEQobUkg3k4Oi9NGTdalO5PU/jwcYCNfVksMPWZg==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/preset-icons@0.56.0: - resolution: {integrity: sha512-b0WrDmChgk+5db6LSiZkCZ3wUInntFU82bbNSspE3DhCSsaNP0S6vxK6RGlyNuQayodsoW3gqThVuND8KYj7kg==} + /@unocss/preset-icons@0.56.1: + resolution: {integrity: sha512-Jwyy7i39Hvt4gf+/vtlIcKucNP2y7IV5nF9KPuDnikho4xS/D24z3lbUclrscbH8XGfRcsUzGHI/y+8gD7zZjQ==} dependencies: '@iconify/utils': 2.1.10 - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 ofetch: 1.3.3 transitivePeerDependencies: - supports-color dev: true - /@unocss/preset-mini@0.56.0: - resolution: {integrity: sha512-uEdaiWF4RiU+RFtQjiv0R3RDRjNV+OFa3C+xVELLOIROnvb+h/D2wVxC8t8qOuVe8I6cHsGJgWfEpT3ptDhxqQ==} + /@unocss/preset-mini@0.56.1: + resolution: {integrity: sha512-hOujmUN5kiA7KCkH1mUFf3cStsa3WZTi3g/I91VQ8EM4S6R7aRvME7LBXlb38z68+pckoDLhOhbN7gSg2iZTjA==} dependencies: - '@unocss/core': 0.56.0 - '@unocss/extractor-arbitrary-variants': 0.56.0 - '@unocss/rule-utils': 0.56.0 + '@unocss/core': 0.56.1 + '@unocss/extractor-arbitrary-variants': 0.56.1 + '@unocss/rule-utils': 0.56.1 dev: true - /@unocss/preset-tagify@0.56.0: - resolution: {integrity: sha512-8FBHa+yPEFQ26BcqgBUrlLX7ThoMPRbH2AjQCk0RpgVhhy6OBweOFXmE0FhcOpNnM6DJadA6vlp3bTXZ0epqVA==} + /@unocss/preset-tagify@0.56.1: + resolution: {integrity: sha512-cd1McbaEpoerduOt8dA6MOkVZQIutuF3dHyjrI/pXbDtoyzBWjT9MLEeV77Hlz3S09+9cqGZddBBkqo0WGsM0w==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/preset-typography@0.56.0: - resolution: {integrity: sha512-CF1dz+00TqTxQSIRkmCaUMk6+bB77z6PWB0VbxxpeYgpxKU1yC247tcBDmrQGhp1NmO4zr9COGEnl/o++OEXmQ==} + /@unocss/preset-typography@0.56.1: + resolution: {integrity: sha512-3p+dWEtMDe8MSPbUZseS94OpdYbv/pMTs2K1NBysE5BjIEVlyxRNWcZ8FC6risAJ1U0Ouctb6BqP6IA8r9BiWQ==} dependencies: - '@unocss/core': 0.56.0 - '@unocss/preset-mini': 0.56.0 + '@unocss/core': 0.56.1 + '@unocss/preset-mini': 0.56.1 dev: true - /@unocss/preset-uno@0.56.0: - resolution: {integrity: sha512-DlTZZ4kS6BEwJTTp5ly86UdhnUhCfgctRDv6gT8LYcji7VInYEPdTA0+Szy7PZtQFeQE8E3kONsiKuoVlwLtPw==} + /@unocss/preset-uno@0.56.1: + resolution: {integrity: sha512-rNnjpmnfrP/1P462dyELBQHe5NDlFSrJevwjCpAOeFXdO0XCCULpHokuaovZYwesNvzzWu+cZequya38n5hkSw==} dependencies: - '@unocss/core': 0.56.0 - '@unocss/preset-mini': 0.56.0 - '@unocss/preset-wind': 0.56.0 - '@unocss/rule-utils': 0.56.0 + '@unocss/core': 0.56.1 + '@unocss/preset-mini': 0.56.1 + '@unocss/preset-wind': 0.56.1 + '@unocss/rule-utils': 0.56.1 dev: true - /@unocss/preset-web-fonts@0.56.0: - resolution: {integrity: sha512-25BSNm29oOY9N37awVV902cmdGd3e8G1EdVm0kqA7YxwUViSdoej0C1R+i27WsrBPtwpLyulRjrjWgtxM/3E8g==} + /@unocss/preset-web-fonts@0.56.1: + resolution: {integrity: sha512-SO2ZjrcFSi02QgQT3UVUtIlZE59A92gB1pzmYTMGZhjhmxqq6aghvBKEC00LfnQ200MRtAawgiZ+5Xysi/XsGg==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 ofetch: 1.3.3 dev: true - /@unocss/preset-wind@0.56.0: - resolution: {integrity: sha512-P978d2+kc/LALmDO8bG00oCvAAA2EGW0mIzoZRM+eb5zWSDEkkSuC+YoiLehbByRkw0voAMgqobWxYIb2GUmfg==} + /@unocss/preset-wind@0.56.1: + resolution: {integrity: sha512-/fR0eYlmezu6R3wWvN5zVNAfOE6rcC1CsEZKH0SdwchMvNDjJNd0rmAechI2BnVBaa3++H2Cz+0AfCDEP8tsjg==} dependencies: - '@unocss/core': 0.56.0 - '@unocss/preset-mini': 0.56.0 - '@unocss/rule-utils': 0.56.0 + '@unocss/core': 0.56.1 + '@unocss/preset-mini': 0.56.1 + '@unocss/rule-utils': 0.56.1 dev: true - /@unocss/reset@0.56.0: - resolution: {integrity: sha512-zTvUeN4Dkn+DY8YFHjKd+hfIpqcsNOKOeD0M64fWVjD0LmuuyuFASySYEGjlfvEEUjDiyNg96SnTXyOETYDclg==} + /@unocss/reset@0.56.1: + resolution: {integrity: sha512-nfzLKv2W9Y3fZLny6lYTroa/YExczGYHsVPCBPGkVt0TrM0yDA+ZKOHbN93b5myY9hzJ3pHTEQmYFsFwzzr6Kg==} dev: true - /@unocss/rule-utils@0.56.0: - resolution: {integrity: sha512-ozxI/KlAZmvRlsVy+oysuCXoxXm6141QsYwH1q8heIBBVTOY1jku82VveCfv4ZWrewYkgd27ME7e77ArfGLzyw==} + /@unocss/rule-utils@0.56.1: + resolution: {integrity: sha512-mmmbx10eELAyhYZqBWlQFPOafnL1hHp2fo18rUbZLedvMJWds3Z23Q/u3VKEpJnCszNkr03BXVwscR5+ZdF4uw==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/scope@0.56.0: - resolution: {integrity: sha512-zGUxAhHh04cqzBgfsAFjQg4xsna+3Y9ST1G/Lcs3CNzm9GC/SSPwcNzFel+r75Wtx/2WlhjmWCnK5gOzRR3l6Q==} + /@unocss/scope@0.56.1: + resolution: {integrity: sha512-qIq/JuibrVOAJw/TCUm54XwHRcDImgrb1abZVuaicFh6fjmpdOi/iglYxoFqXS5gusp0m2vNnOLbaBB4LrPf5Q==} dev: true - /@unocss/transformer-attributify-jsx-babel@0.56.0: - resolution: {integrity: sha512-wOMAr5TnGOZgc6Pqkdecg3O3x1kH7lsyDQxsTqZz3CjYDr9iJMWdRir3UwQVTxg6Xy/BfRE0Qe7LcFIR0BJPHg==} + /@unocss/transformer-attributify-jsx-babel@0.56.1: + resolution: {integrity: sha512-8+l4tfifHiSnga3iaxqXfAMgEJG7yLphKPDSm6DHEMUqKeia9rn3V/bABx5KZxpMmnH6FoiYboJL4uf5W58a5Q==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/transformer-attributify-jsx@0.56.0: - resolution: {integrity: sha512-g1zc7y/oLsSi6qH2GwdfWwWaG6w/hQaL3XyOJ0hpn86N8qcLbeeH7IJdnrGXX1R/w7Z0t9Lz9lhGb+UP3ymmfQ==} + /@unocss/transformer-attributify-jsx@0.56.1: + resolution: {integrity: sha512-2dQ7immRBnZJQ9aU+VIiAbcFCycXq8yXG2RPd82Pl0tAV8f5DtLbbuTC5mzo5lGOhuXJ+/u+IpuL9xchjOV7WQ==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/transformer-compile-class@0.56.0: - resolution: {integrity: sha512-8+CKMGk5qBe3I1/c8DoggWuhVmZ/6QlTHpLRs5Xt6LS5CF2vrLhjyqMNnBvVcp8OKTeAfv2U6kGKPXFSvSEVUA==} + /@unocss/transformer-compile-class@0.56.1: + resolution: {integrity: sha512-v3ICzTWj3oQ1S6qkGzg/oyzrk05ZgdcvjYFSZlgBIu2iUJldBhO0+7ZMuDpniaT21GjJvukLwiWrOF4mYyJCyg==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/transformer-directives@0.56.0: - resolution: {integrity: sha512-6WthoetYrDDKamuYfsRbX+R3scyomcxA10YV8VlZ19hJIyIhZdCWEoyLccVsS4+uBIZUo0RjhxaxwyYtPa1dBQ==} + /@unocss/transformer-directives@0.56.1: + resolution: {integrity: sha512-Pwh+JUxxn8ECqpEWETeD38OON5Y2oYAOC1CFKAyXoK22J7f51THoS07z2rZpDNdQA2T/szxenNCdRt72/NJ/pg==} dependencies: - '@unocss/core': 0.56.0 - '@unocss/rule-utils': 0.56.0 + '@unocss/core': 0.56.1 + '@unocss/rule-utils': 0.56.1 css-tree: 2.3.1 dev: true - /@unocss/transformer-variant-group@0.56.0: - resolution: {integrity: sha512-4QLGUPD2ephvrSemIapiL3ckr1xcdcjxk/VZ/SOobLrHyxCLzLaHZz6x7RabCWf2Ub/01xWtLY3eSNIphZ5iSg==} + /@unocss/transformer-variant-group@0.56.1: + resolution: {integrity: sha512-UwXNcW00R6MjHZajy8lmSfwWDwhnvd+rF9eRGfcJTEzWr+LtEmgw8SJBr7STCB4ZwRE37NIp4oLLl1jF8omGNg==} dependencies: - '@unocss/core': 0.56.0 + '@unocss/core': 0.56.1 dev: true - /@unocss/vite@0.56.0(rollup@2.79.1)(vite@4.4.9): - resolution: {integrity: sha512-QFuX2jHYiNCdzffxVyBuECnkaaQzYkvf+P3VU/yNyUuH9DAzSIBVEpS04dRQQ7IdQiVduIpldL+IgUr/qW+IUA==} + /@unocss/vite@0.56.1(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-IztLc304zP2LYQMsP3yVHmLwXlLUgCY3q6Nkqw6Hpds7l5JXBsE7Q19DtNW+4nDOp9wvWhw7CjQLmoh8d+V0lQ==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.0.4(rollup@2.79.1) - '@unocss/config': 0.56.0 - '@unocss/core': 0.56.0 - '@unocss/inspector': 0.56.0 - '@unocss/scope': 0.56.0 - '@unocss/transformer-directives': 0.56.0 + '@unocss/config': 0.56.1 + '@unocss/core': 0.56.1 + '@unocss/inspector': 0.56.1 + '@unocss/scope': 0.56.1 + '@unocss/transformer-directives': 0.56.1 chokidar: 3.5.3 fast-glob: 3.3.1 magic-string: 0.30.3 @@ -3951,15 +3951,15 @@ packages: - rollup dev: true - /@unocss/webpack@0.56.0(rollup@2.79.1)(webpack@5.88.2): - resolution: {integrity: sha512-j4b5/crVvfeShSyh+3HdagZ1tfkoqxQI6aTCLymMKePUekKGZPKA1v8dC5g3EjM2TG839fdZPPlmjKxlyrrFQw==} + /@unocss/webpack@0.56.1(rollup@2.79.1)(webpack@5.88.2): + resolution: {integrity: sha512-KyOweu+mcYeMKqsERjvZqEcLQWoYGlkiVv0f9dkTpp6PzqfxLh68slLyBr7aOsItor2EpXWeayQrIyU1KiGgRA==} peerDependencies: webpack: ^4 || ^5 dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.0.4(rollup@2.79.1) - '@unocss/config': 0.56.0 - '@unocss/core': 0.56.0 + '@unocss/config': 0.56.1 + '@unocss/core': 0.56.1 chokidar: 3.5.3 fast-glob: 3.3.1 magic-string: 0.30.3 @@ -4551,7 +4551,7 @@ packages: peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 caniuse-lite: 1.0.30001538 fraction.js: 4.3.6 normalize-range: 0.1.2 @@ -4703,15 +4703,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.21.10: - resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} + /browserslist@4.21.11: + resolution: {integrity: sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001538 - electron-to-chromium: 1.4.526 + electron-to-chromium: 1.4.527 node-releases: 2.0.13 - update-browserslist-db: 1.0.12(browserslist@4.21.10) + update-browserslist-db: 1.0.13(browserslist@4.21.11) dev: true /buffer-crc32@0.2.13: @@ -4838,7 +4838,7 @@ packages: /caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 caniuse-lite: 1.0.30001538 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 @@ -5100,7 +5100,7 @@ packages: /core-js-compat@3.32.2: resolution: {integrity: sha512-+GjlguTDINOijtVRUxrQOv3kfu9rl+qPNdX2LTbJ/ZyVTuxK+ksVSAGX1nHstu4hrv1En/uPTtWgq2gI5wt4AQ==} dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 dev: true /core-util-is@1.0.3: @@ -5628,8 +5628,8 @@ packages: jake: 10.8.7 dev: true - /electron-to-chromium@1.4.526: - resolution: {integrity: sha512-tjjTMjmZAx1g6COrintLTa2/jcafYKxKoiEkdQOrVdbLaHh2wCt2nsAF8ZHweezkrP+dl/VG9T5nabcYoo0U5Q==} + /electron-to-chromium@1.4.527: + resolution: {integrity: sha512-EafxEiEDzk2aLrdbtVczylHflHdHkNrpGNHIgDyA63sUQLQVS2ayj2hPw3RsVB42qkwURH+T2OxV7kGPUuYszA==} dev: true /emoji-regex@8.0.0: @@ -5991,7 +5991,7 @@ packages: eslint: 8.49.0 eslint-import-resolver-node: 0.3.9 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.2)(eslint-import-resolver-node@0.3.9)(eslint@8.49.0) - get-tsconfig: 4.7.1 + get-tsconfig: 4.7.2 is-glob: 4.0.3 minimatch: 3.1.2 resolve: 1.22.6 @@ -6078,7 +6078,7 @@ packages: builtins: 5.0.1 eslint: 8.49.0 eslint-plugin-es-x: 7.2.0(eslint@8.49.0) - get-tsconfig: 4.7.1 + get-tsconfig: 4.7.2 ignore: 5.2.4 is-core-module: 2.13.0 minimatch: 3.1.2 @@ -6739,8 +6739,8 @@ packages: get-intrinsic: 1.2.1 dev: true - /get-tsconfig@4.7.1: - resolution: {integrity: sha512-sLtd6Bcwbi9IrAow/raCOTE9pmhvo5ksQo5v2lApUGJMzja64MUYhBp0G6X1S+f7IrBPn1HP+XkS2w2meoGcjg==} + /get-tsconfig@4.7.2: + resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} dependencies: resolve-pkg-maps: 1.0.0 dev: true @@ -8218,10 +8218,6 @@ packages: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: true - /napi-wasm@1.1.0: - resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -9029,7 +9025,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.4.30 @@ -9042,7 +9038,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 postcss: 8.4.30 postcss-value-parser: 4.2.0 dev: true @@ -9118,7 +9114,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 caniuse-api: 3.0.0 cssnano-utils: 4.0.0(postcss@8.4.30) postcss: 8.4.30 @@ -9153,7 +9149,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 cssnano-utils: 4.0.0(postcss@8.4.30) postcss: 8.4.30 postcss-value-parser: 4.2.0 @@ -9234,7 +9230,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 postcss: 8.4.30 postcss-value-parser: 4.2.0 dev: true @@ -9276,7 +9272,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 caniuse-api: 3.0.0 postcss: 8.4.30 dev: true @@ -10306,7 +10302,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 postcss: 8.4.30 postcss-selector-parser: 6.0.13 dev: true @@ -10834,11 +10830,11 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unocss@0.56.0(@unocss/webpack@0.56.0)(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9): - resolution: {integrity: sha512-Ge0lMi1zYL2z/NCv0OMeYMUeLsjQGNeohSc/3qumEtGhBNiGrF6sVX80BnJ99fAFsn80nxJepWbCApUmZ/2tJA==} + /unocss@0.56.1(@unocss/webpack@0.56.1)(postcss@8.4.30)(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-jjkcyXfW90CUjN4tBV6SrHX9ifi5GQgcwAQlMRB0copJEW3ejM/nyZnRgNexaV7hi7Ao76XMVqCKbOC5B+IuOA==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 0.56.0 + '@unocss/webpack': 0.56.1 vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 peerDependenciesMeta: '@unocss/webpack': @@ -10846,27 +10842,27 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.56.0(rollup@2.79.1)(vite@4.4.9) - '@unocss/cli': 0.56.0(rollup@2.79.1) - '@unocss/core': 0.56.0 - '@unocss/extractor-arbitrary-variants': 0.56.0 - '@unocss/postcss': 0.56.0(postcss@8.4.30) - '@unocss/preset-attributify': 0.56.0 - '@unocss/preset-icons': 0.56.0 - '@unocss/preset-mini': 0.56.0 - '@unocss/preset-tagify': 0.56.0 - '@unocss/preset-typography': 0.56.0 - '@unocss/preset-uno': 0.56.0 - '@unocss/preset-web-fonts': 0.56.0 - '@unocss/preset-wind': 0.56.0 - '@unocss/reset': 0.56.0 - '@unocss/transformer-attributify-jsx': 0.56.0 - '@unocss/transformer-attributify-jsx-babel': 0.56.0 - '@unocss/transformer-compile-class': 0.56.0 - '@unocss/transformer-directives': 0.56.0 - '@unocss/transformer-variant-group': 0.56.0 - '@unocss/vite': 0.56.0(rollup@2.79.1)(vite@4.4.9) - '@unocss/webpack': 0.56.0(rollup@2.79.1)(webpack@5.88.2) + '@unocss/astro': 0.56.1(rollup@2.79.1)(vite@4.4.9) + '@unocss/cli': 0.56.1(rollup@2.79.1) + '@unocss/core': 0.56.1 + '@unocss/extractor-arbitrary-variants': 0.56.1 + '@unocss/postcss': 0.56.1(postcss@8.4.30) + '@unocss/preset-attributify': 0.56.1 + '@unocss/preset-icons': 0.56.1 + '@unocss/preset-mini': 0.56.1 + '@unocss/preset-tagify': 0.56.1 + '@unocss/preset-typography': 0.56.1 + '@unocss/preset-uno': 0.56.1 + '@unocss/preset-web-fonts': 0.56.1 + '@unocss/preset-wind': 0.56.1 + '@unocss/reset': 0.56.1 + '@unocss/transformer-attributify-jsx': 0.56.1 + '@unocss/transformer-attributify-jsx-babel': 0.56.1 + '@unocss/transformer-compile-class': 0.56.1 + '@unocss/transformer-directives': 0.56.1 + '@unocss/transformer-variant-group': 0.56.1 + '@unocss/vite': 0.56.1(rollup@2.79.1)(vite@4.4.9) + '@unocss/webpack': 0.56.1(rollup@2.79.1)(webpack@5.88.2) vite: 4.4.9 transitivePeerDependencies: - postcss @@ -10997,13 +10993,13 @@ packages: engines: {node: '>=4'} dev: true - /update-browserslist-db@1.0.12(browserslist@4.21.10): - resolution: {integrity: sha512-tE1smlR58jxbFMtrMpFNRmsrOXlpNXss965T1CrpwuZUzUAg/TBQc94SpyhDLSzrqrJS9xTRBthnZAGcE1oaxg==} + /update-browserslist-db@1.0.13(browserslist@4.21.11): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.10 + browserslist: 4.21.11 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -11405,7 +11401,7 @@ packages: '@webassemblyjs/wasm-parser': 1.11.6 acorn: 8.10.0 acorn-import-assertions: 1.9.0(acorn@8.10.0) - browserslist: 4.21.10 + browserslist: 4.21.11 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 es-module-lexer: 1.3.1 diff --git a/server/api/user/[firebaseId].get.ts b/server/api/user/[id].get.ts similarity index 71% rename from server/api/user/[firebaseId].get.ts rename to server/api/user/[id].get.ts index bbd528e..0254c9e 100644 --- a/server/api/user/[firebaseId].get.ts +++ b/server/api/user/[id].get.ts @@ -1,5 +1,5 @@ export default defineProtectedEventHandler(async (event) => { - if (event.context.firebaseId !== event.context.params!.firebaseId) { + if (event.context.firebaseId !== event.context.params!.id) { throw createError({ status: 403, statusMessage: 'Forbidden',