mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-23 13:46:11 +00:00
cleanup: authcontroller with testable methods and tests (#3054)
* cleanup: authcontroller with testable methods and tests * fix: types Tested this on zenpacket, seems to all be working
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -318,7 +318,11 @@ export class AppStore extends PuterStore {
|
||||
*
|
||||
* Returns the created app row.
|
||||
*/
|
||||
async create(fields, { ownerUserId, appOwner = null } = {}) {
|
||||
async create(
|
||||
fields,
|
||||
/** @type {{ownerUserId?: number, appOwner?: number}} */
|
||||
{ ownerUserId, appOwner = null } = {},
|
||||
) {
|
||||
if (typeof ownerUserId !== 'number') {
|
||||
throw new Error('AppStore.create requires a numeric ownerUserId');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user