mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 02:09:05 +01:00
6de16eb71e
* wip
* wip
* wip
* Update attached_notes.ts
* wip
* Refactor
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update call.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* ✌️
* Fix
34 lines
579 B
TypeScript
34 lines
579 B
TypeScript
import $ from 'cafy';
|
|
import User from '../../../../models/user';
|
|
import { publishMainStream } from '../../../../services/stream';
|
|
import define from '../../define';
|
|
|
|
export const meta = {
|
|
requireCredential: true,
|
|
|
|
secure: true,
|
|
|
|
params: {
|
|
home: {
|
|
validator: $.arr($.obj({
|
|
name: $.str,
|
|
id: $.str,
|
|
place: $.str,
|
|
data: $.obj()
|
|
}).strict())
|
|
}
|
|
}
|
|
};
|
|
|
|
export default define(meta, async (ps, user) => {
|
|
await User.update(user._id, {
|
|
$set: {
|
|
'clientSettings.home': ps.home
|
|
}
|
|
});
|
|
|
|
publishMainStream(user._id, 'homeUpdated', ps.home);
|
|
|
|
return;
|
|
});
|